Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Running a query from remote Comp and saving results
harishkasuganti_at_gmail.com wrote:
> Hi,
> I need to run a simple select query from my desktop and save the
> results in a text file on my desktop. I am planning on setting it up as
> a scheduled task in windows.
>
> I tried using the following
> echo exec dbms_output.putline(desc campaign_0_A) >> C:\test.txt; |
> sqlplus username/pwd_at_DBSERVER
>
> But, it puts out the text 'desc campaign_0_A' in the output file
> test.txt. Can I use dmbs_output command to do this? Or something else?
>
> any suggestion greatly appreciated.
>
> TIA
>
I may be missing something here. If so, I apologize.
Why not use a simple 'spool' statement to spool output to disk?
e.g.:
@echo off
rem example to spool output to local disk
sqlplus username/pwd_at_DBSERVER
set pagesize 66 linesize 128 feedback off verify off termout off
spool c:\mydir\output.txt
select
...
from
...
where
...
/
spool off
exit
[EOF]
Received on Wed Oct 05 2005 - 20:49:34 CDT
![]() |
![]() |