SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

athi
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.

Thanks,
Athi.

visakh16
Very Important crosS Applying yaK Herder

India
52317 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
http://visakhm.blogspot.com/

Go to Top of Page

athi
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  
 New 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.03 seconds. Powered By: Snitz Forums 2000