Solved

Query without column header text

Posted on 2003-11-03
7
669 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

730 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