Solved

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

Posted on 2011-02-22
4
274 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

939 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

7 Experts available now in Live!

Get 1:1 Help Now