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

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
1030071002Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
1030071002Author Commented:
I know that way I would like to write that whole thing like query
0
 
VeerabhadraiahhvConnect With a Mentor Commented:
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
 
1030071002Author Commented:
testing instruction
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.