[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

07/01/2009 at 04:56AM PDT, ID: 24536115 | Points: 250
[x]
Attachment Details

how to use data in unix text file as input to an sql query from shell

Asked by RAVIKUMARDHANEKULA in Unix Systems Programming, SQL Query Syntax

Tags: Shell, text, sql

Hi,
I have data in my unix text file something like this.

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
[+][-]07/01/09 10:58 AM, ID: 24756655

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/24/09 12:34 PM, ID: 24938303

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_4_20070622