Link to home
Start Free TrialLog in
Avatar of juststeve
juststeve

asked on

Query without column header text

I need to eliminate the column header and '_' text that is returned by default. I had thought there was something like the 'set nocount on' to control this but don't find it in BOL (SQL2K)
Avatar of CJ_S
CJ_S
Flag of Netherlands image

I really have no idea what you mean with column header.

The set nocount returns a recordset when there is one, and supresses the messages in the Messages tab.
The set noexec on doesn't execute the query but compiles it.

What exactly do you want?
Avatar of juststeve
juststeve

ASKER

Column  header =  that first row output by a query that identifies the given column. If in QA using 'text' or 'save to file' mode the column names are 'printed' in the first row and the second row is the underbar character repeated across the width of the column.

I'm trying to construct an HTML table by intermixing the HTML code with the query output. I have everything working but need to eliminate those column names and '_' from the beginning of the query.
ASKER CERTIFIED SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That is pretty much built into the Query Analyzer. When you fire a query using ADO the returned resultset will contain only the data and a seperate object for the fieldnames. The query analyzer just reads those columnnames and adds them to the eventual output. I don't think you can get around that using a single query... the query analyzer is meant for database administration and not for automation purposes. if you really want to automate those results i think you should not read / ignore the first two lines.

Or am I misunderstanding your question?
Lowfatspread, I couldn't find that place. Disd find it here though: Tools -> options -> Results
CJ_S
you are missunderstanding the question i think...

and qa  (in its batch version) is perfectly ok for standard Data manipulation...

although DTS is probably the expected route these days..  
sorry yes i work mainly with sql server 7 ....

you've  presumably got sql 2K

;-)