Solved

Query without column header text

Posted on 2003-11-03
7
655 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

770 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