Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: is is possible to retrieve a SELECT query's result in a shell script?
On Thu, 16 May 2002, gregory.luguet_at_evidian.com wrote:
> I am answering myself : I use the SPOOL directive to write the result
> in a file that I later parse
Spool works, but I like the following:
#!/bin/ksh
TableName=$1
sqlplus user/pass_at_instance << EOF
select * from $TableName;
EOF I added the variable substitution to show how you might just parameterize everything. :-)
-- Galen deForest Boyer Sweet dreams and flying machines in pieces on the ground.Received on Fri May 17 2002 - 22:53:13 CDT
![]() |
![]() |