Solved

I have SQL Ressult that I want to put into a excel sheet

Posted on 2011-02-22
4
269 Views
Last Modified: 2012-05-11
I have SQL Ressult that I want to put into a excel sheet  how can I do that right out of the sql query analyzer
0
Comment
Question by:1030071002
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
ThorinO earned 250 total points
ID: 34957088
0
 

Author Comment

by:1030071002
ID: 34957333
I know that way I would like to write that whole thing like query
0
 
LVL 4

Assisted Solution

by:Veerabhadraiahhv
Veerabhadraiahhv earned 250 total points
ID: 34959840
Below is a simple example of writing out the Job name and date to Sheet1 of an Excel spreadsheet in either SQL Server 2005 or 2000:

INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\testing.xls;',
'SELECT Name, Date FROM [Sheet1$]')
SELECT [Name], GETDATE() FROM msdb.dbo.sysjobs
GO

Hope this will help
0
 

Author Comment

by:1030071002
ID: 35209323
testing instruction
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

762 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

21 Experts available now in Live!

Get 1:1 Help Now