December 18, 2007 at 5:01 am
Hi, I'm trying to run some data from query analyser and then extract this onfo in excel.
As there a lot of columns in analyser I want to copy the column names into excel.
is there any way to get the column name ?
Regards
Ritesh
December 18, 2007 at 6:11 am
Please don't cross post. It fragments replies and wastes people's time
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 18, 2007 at 7:04 am
In Management Studio, Go to Tools->Options->Query Results->Results To Text and in Output format change it to CSV.
While executing the query, select Results to File (option in the toolbar) in query window. When you try to execute SSMS will ask you to save the results in a CSV file. You can open CSV files in excel.
The other way would be to run a SSIS package to run your query and output data into excel.
Hope this helps!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply