April 30, 2014 at 4:12 pm
Hi All,
I need help to execute a taxk.
I have text file which has SQL Statements something like
Select top 10 * from Table 1
Select top 10 * from Table 2
Select top 10 * from Table 3
Select top 10 * from Table 4
I want to create a package which has to execute all the sql statements and return all the output in 4 different flat files.
Please advice
April 30, 2014 at 11:03 pm
cvkk2010 (4/30/2014)
Hi All,I need help to execute a taxk.
I have text file which has SQL Statements something like
Select top 10 * from Table 1
Select top 10 * from Table 2
Select top 10 * from Table 3
Select top 10 * from Table 4
I want to create a package which has to execute all the sql statements and return all the output in 4 different flat files.
Please advice
Quick questions, are all the source tables the same structure? Do all the queries return the same structure? Are all the destination flat files of the same structure? Is the statement file a prerequisite for the operation or only the statements? Will the statements change in any way shape or form from one run to another?
😎
May 1, 2014 at 5:29 am
Hi Eirikur,
All the tables are on same database and each table has different structure.
All the three queries are going to return different set of data
eg. 1st table will return Employee information
2nd table will return Case details
3rd table will return metrics information
The flat file contains only select statements and all the statements jus throw some data.
Please advice 🙂
May 1, 2014 at 12:55 pm
SSIS will be difficult to use for this, since the data fow cannot handle changing metadata.
I would simple import the queries from the flat file into the database, loop over them and put an appropriate INSERT statement before each one.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 2, 2014 at 12:37 am
Thank you very much Koen 🙂
May 2, 2014 at 12:39 am
I would recommend a dynamic package or in other words, programmatically generated packages. This is fairly straightforward from a script task in a master package.
😎
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply