dbTalk Databases Forums  

SQL Server Agent Output Log

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SQL Server Agent Output Log in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
spark
 
Posts: n/a

Default SQL Server Agent Output Log - 11-17-2005 , 03:16 PM






Hi,
I have written a SQL server Agent job that deletes some rows in a table that
meets our criteria. It works perfect. But I have a question, is there any way
that after the job it tells me that it has deleted so many number of rows?

my sql statement is

delete from xxxtable where datediff(hh,timegen, getdate()-1)<=24

so now I need the output log to be

job started successful at xxxx time and 1000 rows deleted

Thanks in advance.


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SQL Server Agent Output Log - 11-17-2005 , 03:36 PM






You can do this in the DTS log by using the WriteStringToLog method

Allan

"spark" <spark (AT) discussions (DOT) microsoft.com> wrote


Quote:
Hi,
I have written a SQL server Agent job that deletes some rows in a table
that
meets our criteria. It works perfect. But I have a question, is there
any way
that after the job it tells me that it has deleted so many number of
rows?

my sql statement is

delete from xxxtable where datediff(hh,timegen, getdate()-1)<=24

so now I need the output log to be

job started successful at xxxx time and 1000 rows deleted

Thanks in advance.


Reply With Quote
  #3  
Old   
spark
 
Posts: n/a

Default RE: SQL Server Agent Output Log - 11-21-2005 , 01:31 PM



Thanks, I've got it

"spark" wrote:

Quote:
Hi,
I have written a SQL server Agent job that deletes some rows in a table that
meets our criteria. It works perfect. But I have a question, is there any way
that after the job it tells me that it has deleted so many number of rows?

my sql statement is

delete from xxxtable where datediff(hh,timegen, getdate()-1)<=24

so now I need the output log to be

job started successful at xxxx time and 1000 rows deleted

Thanks in advance.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.