Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Exporting the Results of a Query to Excel?

Author  Topic 

Dasman
Yak Posting Veteran

79 Posts

Posted - 2011-06-27 : 10:17:37
Hello All,

As the subject line says - Is there any way I can run a query and export the resulting table into an excel file? My main goal is to export some data onto excel, but only a limited number of rows- not all of them.

Reason being is that I want to send this excel file to a friend but gmail only allows 25 mb data limit.

Thanks in advance!

Dasman

==========================
Pain is Weakness Leaving the Body.

rajeshweta
Starting Member

5 Posts

Posted - 2011-07-11 : 14:12:14
Hi,

you can do one thing get the data, pass it through execute sql task and limit you query to the amount of data you want and then transfer it in the excel destination.

thanks,
I hope it works for you.
Go to Top of Page

Dasman
Yak Posting Veteran

79 Posts

Posted - 2011-07-13 : 11:45:02
quote:
Originally posted by rajeshweta

Hi,

you can do one thing get the data, pass it through execute sql task and limit you query to the amount of data you want and then transfer it in the excel destination.

thanks,
I hope it works for you.



How do you "transfer it to excel destination?"

I know how to run a simple query say: Select Distinct Column3 From Table

Now I want that as a .XLS or .CSV. How can this be done? What query code or function code?

Thanks,
Dasman

==========================
Pain is Weakness Leaving the Body.
Go to Top of Page
   

- Advertisement -