#!/bin/sh
echo "Retrieve id"
FILE="/tmp/tempid"
MAXID=0
if [ ! -f $FILE ]; then
echo "$FILE : deos not exist"
exit 1
elif [ ! -r $FILE ]; then
echo "$FILE : can not read"
exit 2
fi
# read $FILE using the file descriptors
exec 3<&0 #save standard input
exec 0<$FILE
while read line
do
MAXID=$line
done
#
# Query
#
sh -c "sqlplus etc ................ <
spool /tmp/temp.csv
No comments:
Post a Comment