Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Query with contents of text file.
gazzag wrote:
> Harry331 wrote:
> > A little shell script will do.
> > Suppose you have a text file 'id.txt' containing the id's.
> >
> > $ seq 100 110 > id.txt
> > $ cat id.txt
>
> <--------------------------------------------------sniiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiip--------------------------------->
>
> >Then plug your query to sqlplus.
> >
> > $ sqlplus user/password_at_whaever @myquery.sql
>
> A clasic, convoluted, over-complicated Unix solution. Nice. There may
> be many ways to skin the proverbial cat in a Unix environment, but
> you're still far better off with the right tool for the right job.
>
> As has already been mentioned in this thread, I'd recommend external
> tables. More appropriate, more intuitive, more readable.
OP never mentioned his/her Oracle version which means that you are assuming OP is on 9i and above and can thus use external tables.... and you know what they say about assumptions. Although I agree with you that Unix solution in this instance maybe a bit too much.
I like Brian's first reply which covers almost all Oracle versions.
Regards
/Rauf
Received on Thu Apr 27 2006 - 11:51:11 CDT
![]() |
![]() |