-
Supressing Column headers
hello,
Just curious if we can supress column headers in SQL Server..
example:
create table Empmaster
(
empid int identity(1,1),
empname varchar(10),
empsalary numeric
)
insert Empmaster(empname,empsalary)values('Imran',5000)
insert Empmaster(empname,empsalary)values('Raja',5000)
insert Empmaster(empname,empsalary)values('Ram',8000)
Sql:
Select empname, empsalary from Empmaster
would have a result set like (this is not an exact result from analyser)
empname empsalary
----------- ------------
Imran 5000
Raja 5000
Ram 8000
But I was wondering if I could somehow make it display
Imran 5000
Raja 5000
Ram 8000
I actually implementation of this is something vast, but I have illustrated a very simple example to explain what I want to achieve. Might seem a very simple 1 line solution, but I haven't been able to find it. .If ther is any documentation that might help please reply and point me to that..
thank you
-
Yes, you can turn off column header in query analyzer. Go to tools -> options -> results tab, uncheck 'print column headers'.
-
but I wanna do this from command line with osql to write the result to a file ...
-
If you are running it as a script from command prompt, OSQL has a parameter -h to suppress heading. It is -h -1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|