Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 PRINT OUTPUT; GRIDS and MESSAGE

Author  Topic 

kevinncoyle
Starting Member

3 Posts

Posted - 2004-06-24 : 10:56:20
I have a .sql file that contains many select statements as well as printing counters from each of the selects...when I run it in query analyzer ; I get 2 output areas...a grid that contains ALL the output grids for each of the select statements and a message area that just contains the output from the PRINT statements...I want to add this
.sql as a job that runs each day...but I just want to capture the MESSAGE output to a file...How do I do that..right now I get all the results from the select statement as well as the print results in the output file..

Thanx

KC

X002548
Not Just a Number

15586 Posts

Posted - 2004-06-24 : 11:59:58
echo the messages to a file using xp_cmdshell....

Well that's what I do...



Brett

8-)
Go to Top of Page

kevinncoyle
Starting Member

3 Posts

Posted - 2004-06-24 : 12:07:11
Will that just give the MESSAGE output (PRINT statements)...and not the actual results from the select??? What is the exact syntax...

Thanx
Go to Top of Page

kevinncoyle
Starting Member

3 Posts

Posted - 2004-06-24 : 12:07:11
Will that just give the MESSAGE output (PRINT statements)...and not the actual results from the select??? What is the exact syntax...

Thanx
Go to Top of Page
   

- Advertisement -