Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Remote Execution?
Brian Camper wrote:
>
> I am in the need to run a sequel statement against an Oracle 7.3.3.0.0
> database table. I need to know if there is a way through a command line to
> execute a query by passing in the sql statement and also redirecting the
> output to a file.
>
> For example in Sybase, there was a REXEC command that allowed this feature.
>
> REXEC "select * from table" > c:\output.txt
>
> Thanks you in advance.
>
> Brian Camper
>
> brianc_at_cmhc.com
Try this:
sqlplus -s <<EOF1
userid/password_at_remote.domain.com
spool output.txt
select * from table;
spool off
exit
EOF1
-- John P. Higgins Voice: (309)765-7868 Deere & Company Fax: (309)765-7800 John Deere Road Internet: jh33378nospam_at_deere.com Moline, IL 61265 Opinions: My OwnReceived on Sun Sep 28 1997 - 00:00:00 CDT