|
how to use data in unix text file as input to an sql query from shell
Hi,
I have data in my text file something like this.
Code:
adams
robert
ahmed
gibbs
I want to use this data line by line as input to an sql query which i run by connecting to an oracle database from shell.
If you have code for similar scenario , please ehlp.
I want the output of the sql query to be updated into a text fiel so that i can mail the same as a report.
output expected :
Code:
Name subject marks
adams maths 79
Robert Sceience 67
gibbs maths 81
Thanks in advance
Last edited by Yogesh Sawant; 07-01-2009 at 08:37 AM..
Reason: added code tags
|