Hi,
Im trying to write a script for the following:
I have a file with a list of numbers (over 300)
So I want to input them into a SQL statament:
select * from todo where TODD='89014104254327F';
And them thrown it it a file.
So I thought something like this (not sure of the syntax)
while [ condition until the file finishes ]
do
output=`sqlplus -s ${db_user}/${db_pass}@${SID} <<!
set heading off
set feedback off
select * from todo where TODD=${variable};
exit;
!`
${output} >> ultimate_file.txt
some counter for the condition??
done
===================
The file with the numbers looks like this:
525245
252524
252345
234245
242342
123123
144144
.
.
Tks,
joao
Open in new window