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
 SQL Server Development (2000)
 How do I get the crud data off of my report?

Author  Topic 

ELLIEMAY
Starting Member

43 Posts

Posted - 2004-10-26 : 17:48:24
Hello,

I have a query that I am running in a job that exports my data to a file, but it adds a header and footer to the report that I didn't ask for. How do I get it to go away.

Example crud data at top:

Job 'CBORD Query' : Step 1, 'cbord script' : Began Executing 2004-10-26 11:25:06

Column1
----------
----------
----------

Example Crud data at bottom:

(4961 rows(s) affected)

Thanks in advance for the help!!!

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-10-26 : 18:19:38
You should use "SET NOCOUNT ON" to get rid of the bottom part.
As for the top part, there probably is a PRINT statement at the top.

rockmoose
/* Chaos is the nature of things...Order is a lesser state of chaos */
Go to Top of Page

ELLIEMAY
Starting Member

43 Posts

Posted - 2004-10-27 : 12:17:04
Thanks, but it only works in query analyzer. When I create a job under SQL SERVER AGENT and use the query it puts all the garbage back. Thanks again in advance!
Go to Top of Page

ELLIEMAY
Starting Member

43 Posts

Posted - 2004-10-27 : 16:47:17
BUMP. :)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-10-27 : 18:12:58
You need to put SET NOCOUNT ON in your job as well. Why not just use bcp to output the data how you want it? You can schedule the bcp command in a job as well. You won't get this "CRUD" data in it.

Tara
Go to Top of Page

ELLIEMAY
Starting Member

43 Posts

Posted - 2004-10-28 : 11:22:13
I did set it to ON in the job, but it still gave me the garbage. I took your advice and used BCP and it is working fine. Now I just have to figure out how to get rid of the blank records. There are serveral NULL records in my source. Thanks!!!
Go to Top of Page
   

- Advertisement -