Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 3rd, 2006, 03:25 AM
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default Enterprise Manager vs SQL Management Studio

Hi.

In EM, if you had run a Query, you were able to copy also the Column-headings (and paste them into say Excel).

Does anyone know if this is possible also in SQL Management Studio? And if so, how to do it?

Gert

 
Old April 3rd, 2006, 02:54 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

create a new query and select the results to file option

 
Old April 18th, 2006, 09:37 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

"Results to File" is best, but you can also select "Results to Text" option and that will allow you to copy and paste the query results, including the column headings.

 
Old April 19th, 2006, 03:45 AM
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your replies.

Allthough these are good sugestions, it seems to me that if I want the info into Excel, it doesn't work just as I need it too. In excel all the row data ends up in the first cell. I need the seperate columns to end up in seperate columns also in excel.

Gert

 
Old April 25th, 2006, 11:13 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

First ensure that Tools, Options, Query Results, SQL Server, Results to Grid, has the check next to Include to column headings when copying or saving the results.

Then run your query in Grid mode, then right click the grid and select Save As, then save it as a csv. Open the CSV in excel and you will have the column headings

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com
 
Old April 26th, 2006, 01:47 PM
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks ALOT David. This is just what I was looking for...

It also works with copy/paste into Excel.

:-)

Gert






Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant Open SQL Management Studio sahmed1983 BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 January 8th, 2007 02:47 PM
Porting SQL Enterprise Manager Tree Settings plusultra SQL Server 2000 1 June 26th, 2006 04:41 AM
Enterprise Manager/SQL Connection Problem wdfadude SQL Server 2000 1 July 14th, 2005 02:22 PM
SQL enterprise manager doesn't see mapped drive Cinderella SQL Server 2000 9 June 20th, 2005 11:49 AM
SQL Server using Enterprise Manager - winproxy whiterainbow SQL Server 2000 0 December 8th, 2004 02:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.