Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS Package Execution Expand / Collapse
Author
Message
Posted Wednesday, April 30, 2014 4:12 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 6, 2014 1:30 PM
Points: 3, Visits: 9
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

Post #1566621
Posted Wednesday, April 30, 2014 11:03 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 11:00 AM
Points: 2,214, Visits: 5,986
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?
Post #1566636
Posted Thursday, May 1, 2014 5:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 6, 2014 1:30 PM
Points: 3, Visits: 9
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
Post #1566673
Posted Thursday, May 1, 2014 12:55 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:34 AM
Points: 13,277, Visits: 11,066
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.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1566831
Posted Friday, May 2, 2014 12:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 6, 2014 1:30 PM
Points: 3, Visits: 9
Thank you very much Koen :)
Post #1566934
Posted Friday, May 2, 2014 12:39 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 11:00 AM
Points: 2,214, Visits: 5,986
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.
Post #1566936
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse