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 2008 Forums
 Analysis Server and Reporting Services (2008)
 Exporting 30 query output to Excel tabs

Author  Topic 

athi
Starting Member

2 Posts

Posted - 2013-02-07 : 18:32:35

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.

Thanks,
Athi.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-07 : 23:25:07
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
http://visakhm.blogspot.com/

Go to Top of Page

athi
Starting Member

2 Posts

Posted - 2013-02-08 : 07:53:58
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
   

- Advertisement -