Not able to Loop a sql query in shell script
980455Dec 18 2012 — edited Dec 18 2012Hi, I am not able to loop a sql query i am reading data from file replacing the part no in the where clause of query.
FILENAME=$1
while read LINE
do
VALUE=$LINE
echo "NAME $VALUE"
sqlplus -s wcadmin/wcadmin@wctest98 <<EOF
select ida2a2,name from REPORT where ida2a2=$VALUE;
EOF
echo "done"
done < $FILENAME
I am getting a Error: Syntax error at line 10 : `done' is not expected which done < $FILENAME i am using c shell.