RE: Running a Windows batch file based on ROWCOUNT of a table

RE: Running a Windows batch file based on ROWCOUNT of a table

 

  

Hi Andrews,

This solution works precisely the way I wanted. Thanx a lot for the same.
Regards

-----Original Message-----
From: Andrew Hayes
[mailto:oracledba-ezmlmshield-x14584293.[Email address protected]
Sent: Thursday, June 03, 2004 9:12 AM
To: LazyDBA.com Discussion
Subject: RE: Running a Windows batch file based on ROWCOUNT of a table


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.




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: send a blank email to oracledba-[Email address protected]
By using this list you agree to these
terms:http://www.lazydba.com/legal.html




Oracle LazyDBA home page