Solved

Query without column header text

Posted on 2003-11-03
7
631 Views
Last Modified: 2012-06-21
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)
0
Comment
Question by:juststeve
  • 3
  • 3
7 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 9670554
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?
0
 

Author Comment

by:juststeve
ID: 9670621
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.
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 250 total points
ID: 9670630
in query analyzer

select Query
select current connection options
select Advanced
Unselect Print Headers

and for OSQL/ISQL
 use -h-1

to specify no headers...

0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 22

Expert Comment

by:CJ_S
ID: 9670651
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?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 9670666
Lowfatspread, I couldn't find that place. Disd find it here though: Tools -> options -> Results
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9670669
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..  
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9670686
sorry yes i work mainly with sql server 7 ....

you've  presumably got sql 2K

;-)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now