Solved

SQL Query Analyzer to Excel

Posted on 2013-05-13
8
257 Views
Last Modified: 2013-05-13
Good Day Experts!

Hope you all can help me with my dilemna.  I have query results in QueryAnalyzer.  I need to get it to Excel.  I cannot save as CSV as some of the column values have commas in them.  

What is the best way to get this data into Excel?

Thanks,
jimbo99999
0
Comment
Question by:Jimbo99999
  • 4
  • 4
8 Comments
 
LVL 18

Accepted Solution

by:
x-men earned 500 total points
ID: 39161866
create a data source in Excel, pointing to your server and run the query directly.

Menu: Data - From Other Sources - From SQL Server
fill out the wizard

You'll get the table in Excel.

Select a cell (from the table) go to Data - Connections - Properties - Definition:
Command Type: SQL
Command Text: Your query
0
 

Author Comment

by:Jimbo99999
ID: 39161902
Thanks for responding.  But I am not sure where to put the query that I was using in QueryAnalyzer?
0
 
LVL 18

Expert Comment

by:x-men
ID: 39161920
Select a cell (from the new created table) go to Data - Connections - Properties - Definition:
Command Type: SQL
Command Text: Your query
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:Jimbo99999
ID: 39161951
I cannot afford to import the entire contents of the SQL table into Excel and then query it.
0
 
LVL 18

Expert Comment

by:x-men
ID: 39161987
after you click the Finish button of the wizard, a new window will appear, where you chose the range to place the data. Click the properties button on that window, click the Definition tab, change the "Command Type" to SQL, and place your query on the "Command text" area
0
 

Author Comment

by:Jimbo99999
ID: 39162002
Ok, I will try now.  I was not aware of this in Excel and appreciate your patience with my first time use.

Thanks,
jimbo99999
0
 

Author Comment

by:Jimbo99999
ID: 39162089
It is working great.  Thanks for the help. I know have another tool in my back pocket.

Thanks,
jimbo99999
0
 
LVL 18

Expert Comment

by:x-men
ID: 39162116
try the PowerPivot feature. You're gonna love it ;)
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question