Try a SQL script something like...
set heading off
spool temp.sql
select 'host dosfile.bat'
from table
where <clause>;
spool off
@temp.sql
.. you could even be a little more clever and pick the script name based on data in a table...
select 'host '||table.column
from table ... etc
Regards.
-----Original Message-----
From: Rajesh_Puneyani
[mailto:oracledba-ezmlmshield-x65783760.[Email address protected]
Sent: Wednesday, June 02, 2004 8:19 PM
To: LazyDBA.com Discussion
Subject: Running a Windows batch file based on ROWCOUNT of a table
Hi all,
If I want to run a windows batch file based on the rowcount <> 0 of a table
then how should I do that ?
IF I use a PL/SQL block to SELECT and TEST rowcount then I can not use HOST
command to call batch file.
On the other hand If I don't use PL/SQL then I can not test rowcount <>0
Pls. advise
Thanx
email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. You may not read, copy, distribute or make any other use of this email or its contents. Opinions, conclusions and other information expressed in this message are the sender's personal views and do not necessarily represent the views of the company. This footnote also confirms that this email message has been swept by Sophos Mailmonitor for the presence of computer viruses. However, we recommend that you virus-check attachments before opening.
Oracle LazyDBA home page