schintapalli
Programmer
Hi
Thanks Shriyan for your reply to my previous posting.
I have a problem in capturing the sql out put. I am using a small shell script which is intended to capture the output after executing a sql. But the output is containing actual sql query also. How can I avoid the sql query but capture the result set alone. Calling shell script looks like
echo 'Execution starts' > test1
sh a1.sh >> test1 2>&1
The called shell script a1.sh looks like
DBNAME=db1@srvr1
INTERFACE_CMD="dbaccess"; export INTERFACE_CMD
DBCOMMAND="$INTERFACE_CMD -e $DBNAME"; export DBCOMMAND
for i in `cat tbllist`
do
echo executing script $i
$DBCOMMAND $i 2>&1 >> test1
done
Here the tbllist has a sql file name (mysql.sql)listed in it.
The sql in mysql.sql is "select * from customer ;"
The output file test1 looks like
----------------------
Execution starts
executing script mysql.sql
select * from customer
1 row(s) retrieved.
Database closed.
1 2003-11-11 12:32:00.000
----------------------------------------
IN the above output I do not want 'select * ...'
Regards
Thanks Shriyan for your reply to my previous posting.
I have a problem in capturing the sql out put. I am using a small shell script which is intended to capture the output after executing a sql. But the output is containing actual sql query also. How can I avoid the sql query but capture the result set alone. Calling shell script looks like
echo 'Execution starts' > test1
sh a1.sh >> test1 2>&1
The called shell script a1.sh looks like
DBNAME=db1@srvr1
INTERFACE_CMD="dbaccess"; export INTERFACE_CMD
DBCOMMAND="$INTERFACE_CMD -e $DBNAME"; export DBCOMMAND
for i in `cat tbllist`
do
echo executing script $i
$DBCOMMAND $i 2>&1 >> test1
done
Here the tbllist has a sql file name (mysql.sql)listed in it.
The sql in mysql.sql is "select * from customer ;"
The output file test1 looks like
----------------------
Execution starts
executing script mysql.sql
select * from customer
1 row(s) retrieved.
Database closed.
1 2003-11-11 12:32:00.000
----------------------------------------
IN the above output I do not want 'select * ...'
Regards