Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
imrul
Starting Member
36 Posts |
Posted - 2009-01-15 : 01:47:14
|
Hi, I want the result of a query without the column name andno of rows affected message. That is to say, result of the queryuse NorthwindSelect CategoryId,CategoryName From dbo.CategoriesShows:CategoryId CategoryName ----------- --------------- 1 Beverages2 Condiments3 Confections4 Dairy Products5 Grains/Cereals6 Meat/Poultry7 Produce8 Seafood(8 row(s) affected)I need the result like1 Beverages2 Condiments3 Confections4 Dairy Products5 Grains/Cereals6 Meat/Poultry7 Produce8 SeafoodCan any one help? |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-01-15 : 02:15:30
|
1 Why do you not want to display column names?2 Put this at the beginning of the querySET NOCOUNT ONMadhivananFailing to plan is Planning to fail |
|
|
imrul
Starting Member
36 Posts |
Posted - 2009-01-15 : 02:23:52
|
thanks madhivanan,I have to run bunch of query and the ultimate result will be comma separated value with only one header.Business wants the result in txt, but should have an option to open it through excel. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-01-15 : 02:31:26
|
quote: Originally posted by imrul thanks madhivanan,I have to run bunch of query and the ultimate result will be comma separated value with only one header.Business wants the result in txt, but should have an option to open it through excel.
Ok. How can eliminating column names solve your problem?MadhivananFailing to plan is Planning to fail |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-15 : 07:52:10
|
quote: Originally posted by imrul thanks madhivanan,I have to run bunch of query and the ultimate result will be comma separated value with only one header.Business wants the result in txt, but should have an option to open it through excel.
what meaning does it make when you have data in excel without any headers? or are you trying to produce a csv list from the above data? |
|
|
imrul
Starting Member
36 Posts |
Posted - 2009-02-02 : 10:56:29
|
Hi Visakh, I need a CSV File from the above data. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|