SQL Query Analyzer to Excel

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
Jimbo99999Asked:
Who is Participating?
 
x-menConnect With a Mentor IT super heroCommented:
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
 
Jimbo99999Author Commented:
Thanks for responding.  But I am not sure where to put the query that I was using in QueryAnalyzer?
0
 
x-menIT super heroCommented:
Select a cell (from the new created table) go to Data - Connections - Properties - Definition:
Command Type: SQL
Command Text: Your query
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Jimbo99999Author Commented:
I cannot afford to import the entire contents of the SQL table into Excel and then query it.
0
 
x-menIT super heroCommented:
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
 
Jimbo99999Author Commented:
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
 
Jimbo99999Author Commented:
It is working great.  Thanks for the help. I know have another tool in my back pocket.

Thanks,
jimbo99999
0
 
x-menIT super heroCommented:
try the PowerPivot feature. You're gonna love it ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.