Monday, July 21, 2008

HOST COMMAND IS EXECUTED BEFORE SQL STATEMENT

I was trying to write a script that executes a HOST command after executing some SQL statements. But the HOST command is being executed before the SQL statements.

The command "PAUSE" that can be used here to get rid of this problem. PAUSE command requires the user to press "return" key to proceed. For example,

spool test.log
select * from a;
spool off
host cp test.log ./sadat/
pause
spool test1.log
select * from b;
spool off
host cp test1.log ./sadat/
pause
...............
....

No comments:

search engine

Custom Search