Solved

SQL Query Analyzer to Excel

Posted on 2013-05-13
8
222 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
 

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now