Solved

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

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

776 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