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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Exporting 30 query output to Excel tabs
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 02/07/2013 :  18:32:35  Show Profile  Reply with Quote

Hi All,

I am new to SSIS and am currently working on a requirement as follows:

We have 30 sql scripts which queries various tables and gives the errors for each packages we have. We manually copy the script outputs to separate tabs in an excel sheet and send it to our clients. I am working on automating this using SSIS. So right now I have created a package which runs one sql script and writes to excel file tab. So to output 30 script results do I have to implement the above solution 30 times or is there any optimum way of implementing them?

Any suggestions would be welcome.


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 02/07/2013 :  23:25:07  Show Profile  Reply with Quote
you can add for each loop container which loops through scripts (i guess they're stored in table/file). use ADO enumerator if they're in table of file enumerator if in file.
then inside add a data flow task to grab the query and then transfer it to excel using excel destination. you can specify sheet on the fly using expression builder

SQL Server MVP

Go to Top of Page

Starting Member

2 Posts

Posted - 02/08/2013 :  07:53:58  Show Profile  Reply with Quote
Thanks. Right now I have all the scripts in one sql file.So my first task would be to either insert it into a table or separate files. If possible can you give me detailed steps as I am new to SSIS. But I would definitely try out this approach.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000