Extracting data from SQL using a variable from a file


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Extracting data from SQL using a variable from a file

Though, its not new, I am a newbie to shell scripting. Please help me with the below.

There are two steps.

First one is to read a table and create a file with the distinct values. I am able to get this done.

Second step is to read the file (which has the single value, like a number) and pass it as a variable to the sql with which I have to get that particular set of data to send an email.

I tried to create the script but could not create it without errors.

Can you please help me with a small sample of it so that I can use it to create it as per my requirement.


Thanks a lot for your time and information.
# 2  
So put the job you have done here, and the problem code, we can help to fix it.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Extracting data from file
slipshft
I am trying to compare the data in lines 3 & 5 to see if they match up to the '-S570' (see first code set, all proprietary information has been removed from code set) spawn telnet Trying ... Connected to CA-LOS1234-ASE-S570.cl . Escape character is '^]'. CA-LOS1234-ASE-S570 Username: ...... UNIX for Dummies Questions & Answers
1
UNIX for Dummies Questions & Answers
Extracting specific lines of data from a file and related lines of data based on a grep value range?
Wynner
Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ...... Shell Programming and Scripting
3
Shell Programming and Scripting
How to use sql data file in unix csv file as input to an sql query from shell
Nareshp
Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s...... Shell Programming and Scripting
2
Shell Programming and Scripting
Extracting Data from a File
oop
Hi I need to calculate the number of occurrences of a item in a number of files using Perl. The item appears continually throughout the files but in each case I only want to calculate it in certain blocks of the file. Example - Calculalte the number of occurrences of a 'pass' in a block of...... UNIX for Dummies Questions & Answers
0
UNIX for Dummies Questions & Answers
how to assign sql output data to shell script variable
kattics
Hi Guys ! I am new to unix and want to find out how we can make sql statement data to shell script variable? Any help/suggestion is greatly appreciated -Chandra... Shell Programming and Scripting
1
Shell Programming and Scripting