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)
 URGENT: Getting rid of Column Headers in Output

Author  Topic 

5fifty5
Starting Member

35 Posts

Posted - 2010-01-28 : 09:40:55
Hi,
I am in desperate need of getting rid of columns in the output of my query.

I am running a stored procedure and the output is directed to a CSV file through a DTS. Is there a way by which I can get rid of the column headers in the output. For instance, we can get rid of "X rows affected" towards the end of query by:

SET NOCOUNT ON

Is there a same way to ignore the headers too? I am on SQL 2000 and the DTS function saying "First column has headers" doesn't do anything at all either.

Would really appreciate any help.

Kristen
Test

22859 Posts

Posted - 2010-01-28 : 10:10:04
DTS is putting in the headers, not SQL, so it will be a setting in DTS.
Go to Top of Page

5fifty5
Starting Member

35 Posts

Posted - 2010-01-28 : 10:19:38
quote:
Originally posted by Kristen

DTS is putting in the headers, not SQL, so it will be a setting in DTS.



Is there a setting for that then? What I am trying to say is that just like you get rid of RowCount towards end of a result set, can you get rid of Column Headers.

Let me give you another example:
Just like you have SET FMTOnly ON, I would need something exactly opposite to this i.e. Result set without headers. Does that help ??
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-01-28 : 10:33:06
SQL 2000 DTS too long ago I'm afraid, I can't remember. I expect there is ... but ... maybe they never added that ...

SQL is NOT putting the column headers in. SQL IS sending information about each column, including the Name but also Datatype, size, etc., and from that DTS MUST be putting the column headers in. Hence I think that DTS is the only place you could turn it off.

I think BCP would output a CSV for you, without headers, but that is probably a huge leap (i.e. lots of DEV time ) from where you are currently - i.e. using DTS - unless you already have BCP knowledge / skills.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-01-28 : 11:37:02
In your DTS package right click on the symbol of your output file and choose the properties.
In the next windows you can see your filename and path and below is a button properties... click it!
In the next window you can check a box to have column headers or not.

edit:typo

No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-01-28 : 11:45:39
Shocking WebFred. You not upgraded yet then?
Go to Top of Page

5fifty5
Starting Member

35 Posts

Posted - 2010-01-28 : 11:50:14
quote:
Originally posted by webfred

In your DTS package right click on the symbol of your output file and choose the properties.
In the next windows you can see your filename and path and below is a button properties... click it!
In the next window you can check a box to have column headers or not.

edit:typo

No, you're never too old to Yak'n'Roll if you're too young to die.



I had that box Checked. Just unchecked it and it has worked...
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-01-28 : 12:06:03


Buried mighty deep though
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-01-28 : 14:30:48
quote:
Originally posted by Kristen

Shocking WebFred. You not upgraded yet then?


We have a customer who has a lot of DTS packages and so there is ONE server left with this old stuff.

And... I like it much more than SSIS


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -