SQL Server - export sql query analyzer data to excel

Asked By melike malkoc
29-Dec-04 03:00 AM
hi 
i am melike 
i connected with sql server and getted data with sql query analyzer 
and i want to see my data in excel program 
how can i do it?
can i export data to excel?
can you help me?
thankss.....

Not directly from Query Analyzer  Not directly from Query Analyzer

29-Dec-04 07:46 AM
If you want to export data from SQL Server into Excel, you using the DTS Wizard.  You launch it by opening up the Import/Export Wizard instead of Enterprise Manager.  Or, you can launch it from within Enterprise Manager by clicking Tools/Data Transformation Services.

For a quick and dirty export try these suggestion  For a quick and dirty export try these suggestion

30-Dec-04 03:07 PM
You can export the results from the grid in Query Analyzer in the following ways:

1. Right click and choose "Save As". Your results will be saved as a CSV file.
2. Right click and choose "Select All" then choose "Copy". Paste your results in Excel. 

These methods both fail to bring the Column Names over. However, if you have minimal number of columns, these methods work fine as you can easily recreate the headings.

You can also choose to have the results returned in text instead of grid in the Query Analyzer. I have run simple queries to text, and using the right click, "Select All" then copy and paste into Excel. You then need to use the "Text to Columns" feature in Excel to separate the data into Columns. This method returns the column names for you.

Probably the easiest, and method, if you have access to the Enterprise Manager as well, is to work in Query Analyzer, then copy your query into a "New View" run the query and get the results. Click the first column heading and drag your mouse to the last, highlightling all the columns, then hit CTRL+C (copy), paste your results into an Excel Worksheet and off you go. 

I use these quite frequently for checking data in Excel.

One other way to do this is to use the MS Query tool in Excel. You can start a query using the Wizard, then click cancel. You will be prompted to continue "manually editing the query". Say Yes or OK to this. Then you get the MS Query Grid. Click the SQL Button and cut and paste your SQL statement in here from the SQL Query Analyzer and then click run. Return the data to Excel and "voila". This is great if you have a query that you use often that you want to export or "dump" the data, as you can save the spreadsheet, as a template even, so that it is available for quick updates.

Hope this helps.
Create New Account
help
occurred when retrieving data " name of the database ." For more information administrators can view the server log . Can you tell me where is the problem ? Find attached the log file. Thanks High Log retention limit reached. Log file 'C: \ Program Files \ Common Files \ Microsoft Shared \ Web Server Extensions \ 14 \ LOGS \ TRICOFLEX-20111030-0008.log' has been deleted. 11 / 13 / 2011 00:08 e63e-4ee9-b396-3fc61e3e6b80 11 / 13 / 2011 00:08:31.87 w3wp.exe (0x0DB4) 0x0AB8 Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize = 536850432. 53fed7f1-b549-1a88-0000-000050f7b00c b289-46d6-9f02-ade97cfcf496 11 / 13 / 2011 00:08:34.05 w3wp.exe (0x0DB4) 0x0BEC Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Disk Manager: CurrentSize = 352934. 11c5f189-b549-1a88-0000-000050f7b00c 9ac7-45b9-a19e-ce6cc85ad1b9 11 / 13 / 2011 00:08:36.88 w3wp.exe (0x0DB4) 0x0AB8 Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize = 536850432. 53fed7f1-b549-1a88-0000-000050f7b00c
choosen the Blog post from here This means the installation should be on a single server as Domain Controller , as MS SQL database server and as MOSS2007 server farm. Only one uses should be used. Thats what I have done, I followed the I am reading the logfiles placed under "c: \ program files \ common files \ microsoft shared \ web server extensions \ 12 \ logs". I don't find any relavant information regarding authentication or what else Anmeldung.' Source: '.Net SqlClient Data Provider' Number: 4060 State: 1 Class: 11 Procedure: '' LineNumber: 65536 Server: 'd-it5-sptest-dc' 03 / 04 / 2010 13:53:11.35 OWSTIMER.EXE (0x0980) 0x0988 spadmin'.' Source: '.Net SqlClient Data Provider' Number: 18456 State: 1 Class: 14 Procedure: '' LineNumber: 65536 Server: 'd-it5-sptest-dc' 03 / 04 / 2010 13:53:11.37 OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 6y63 Critical SQL Database 'SharePoint_07_Config' on SQL Server instance 'd-it5-sptest-dc' not found. Additional error information
Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B)What is a objects in Remoting? (A) What are the ways in which client can create object on server in CAO model? (A) Are CAO stateful in nature? (A) To create objects in CAO page ? (I) Can we post and access view state in another application? (I) What is SQL Cache Dependency in ASP.NET 2.0? (I) How do we enable SQL Cache Dependency in ASP.NET 2.0? (I) What is Post Cache substitution? (I) Why NET? (B) Can you explain “AutoPostBack”? (B) How can you enable automatic paging in Data Grid? (B) What is the use of “GLOBAL.ASAX” file? (B) What is the difference between Config”? (B) What is a SESSION and APPLICATION object? (A) What is the difference between ‘Server.Transfer’ and ‘response. Redirect’ ? (A)What is the difference between Authentication and authorization? (I) what NET? (A)How does authorization work in ASP.NET? (B)What is difference between Data grid, Datalist, and repeater? (A)From performance point of view, how do they rate? (B)What
There is an error like Error :The project could not be deployed to the 'localhost' server because of the following connectivity problems : A connection cannot be made. Ensure that the server is running. To verify or update the name of the target server, right-click on the project in Solution Explorer, select Project Properties, click on the Deployment tab, and then enter the name of the server. i m not able to deploy. Plz tell me wht are the configuration of this http: / / msdn.microsoft.com / en-us / library / ms175672.aspx For cube building, you can use SQL Server 2000 Analysis Services, SQL Server 2005 Analysis Services, or SQL Server 2008 Analysis Services. This article describes requirements for using