Search

Set Heading Off by AussieJohn

Closed
as Won't Fix Help for as Won't Fix

1
0
Sign in
to vote
Type: Suggestion
ID: 780968
Opened: 3/7/2013 4:00:32 PM
Access Restriction: Public
0
Workaround(s)
Inside a stored procedure (or other TSQL) I can suppress the “rows returned” output at the end of a result set using “SET NOCOUNT ON”. I’d like to be able to do the same with the column headings at the start of the result set.

This only is an issue for me when logging, i.e. when generating details from the running of scheduled jobs and other processes. If the PRINT statement wasn’t so verbose in this context (see Connect 514944 “Closed Won’t Fix”) then it could be used instead of SELECT.

I’d like my log output to look like this

Job 'DBA - DBCC Checkdb - Physical' : Step 1, 'DBCC Checkdb - Physical Only' : Began Executing 2013-03-07 22:30:00

Database: AdventureWorks2012 - 22:30:00 - "DBCC CHECKDB ([AdventureWorks2012]) WITH TABLERESULTS, PHYSICAL_ONLY "
DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]

Database: Application_Registry_Service_DB_efe162c8b0ca4ceda16af544108c150d - 22:30:03 - "DBCC CHECKDB ([Application_Registry_Service_DB_efe162c8b0ca4ceda16af544108c150d]) WITH TABLERESULTS, PHYSICAL_ONLY "
DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]



(three lines per database, of which one is blank). Instead it looks like this

Job 'DBA - DBCC Checkdb - Physical' : Step 1, 'DBCC Checkdb - Physical Only' : Began Executing 2013-03-07 22:30:00


-


--------------------------------

<this was too big for this field, so I've had to truncate it>

See attached file for a fuller description/example.

Proposed Solution:
A “SET HEADING OFF” set option, or similar, within TSQL, similar to SET NOCOUNT ON
Details (expand)

Product Language

English

Category

SQL Engine

Proposed Solution

A “SET HEADING OFF” set option, or similar, within TSQL, similar to SET NOCOUNT ON

Primary Benefit

Improved Administration

Other Benefits

 

Virtualization

 
File Attachments
File Name Submitted By Submitted On File Size  
connect.txt 3/7/2013 10 KB
connect.txt 3/7/2013 10 KB
Sign in to post a comment.
Posted by Microsoft on 4/1/2013 at 9:36 AM
Thanks for your feedback. Unfortunately we will not be able to address this because of other priority work.
Sign in to post a workaround.