Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> dynamic SQL query question

dynamic SQL query question

From: <leileili_at_hotmail.com>
Date: 18 May 2005 15:11:25 -0700
Message-ID: <1116454285.235353.91230@g47g2000cwa.googlegroups.com>


Hello,
I'm new in dynamic SQL query and I have a problem need help.

For example: I have a SQL query like this:

select hw.family,hw.id where hw.id="1234567";

and I have a txt file holding more than ten thousands id. I need feed the ids from the file to the SQL query, inside the "???", please let me know how can I do this?

then I put the SQL query in a file and run it from another .csh file. Inside the .csh file, I have something like this:

mysql -u usrname dataname< /directory/sqlfile
>/directory/outputfile/id_???

how can I have the output files created with different names according with the id inputs in the run time?

Thanks a lot. Received on Wed May 18 2005 - 17:11:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US