Re: A Question

From: joel garry <>
Date: Fri, 29 May 2009 11:01:13 -0700 (PDT)
Message-ID: <>

On May 29, 7:13 am, Wudong <> wrote:
> Dear All:
> I have a question on Oracle.
> Basically I have a file with each row is an ID to a row in the
> database. I need to retrieve all the rows with the ID in that file.
> What will be the best way to do that? I'm wondering if Oracle have a
> tool that could possibly help the process because I feel it's quite
> common task..:)
> many thanks.
> Wudong

If it's a small file, you can process it like (untested, off the top of my head, there are better ways, depending, just curious if I could do it as a one-liner aside from wrapping):

awk 'BEGIN {print " set verify off echo off feedback off pages 0 heading off termout off" ;print "select * from yourdbtable where youridentifier in (" } {print "\047" $1"\047"} END {print"\047somethingnotpossible\047)"}' < yourfile > yoursqlcommand.sql

Once tested, you could replace the redirected output with a pipe to sqlplus.


-- is bogus.
Received on Fri May 29 2009 - 13:01:13 CDT

Original text of this message