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

multiple conditional splits in ssis Expand / Collapse
Author
Message
Posted Thursday, December 20, 2012 1:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 22, 2013 4:34 AM
Points: 5, Visits: 196
Hi,

I have a flatfile which contains 100 diff locations, i want split the data based on the name of city
Ex:-
cid,cname,loc
1,aa,us
2,bb,uk
3,cc,russaia
........ upto 100

so want split the data based on condition in ssis using condtionalsplit
i can write loc=='us'
loc=='uk'
......

shoul i write like 100 expressions or is any way?????
Post #1398858
Posted Thursday, December 20, 2012 4:01 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:02 PM
Points: 5,259, Visits: 12,193
venkatareddy.mora (12/20/2012)
Hi,

I have a flatfile which contains 100 diff locations, i want split the data based on the name of city
Ex:-
cid,cname,loc
1,aa,us
2,bb,uk
3,cc,russaia
........ upto 100

so want split the data based on condition in ssis using condtionalsplit
i can write loc=='us'
loc=='uk'
......

shoul i write like 100 expressions or is any way?????


Can you explain a bit about why do you need to do this?



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1398894
Posted Thursday, December 20, 2012 4:49 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 13,564, Visits: 11,375
A very elaborate workaround:

you could use the Export column to export each location to a seperate flat file (you'd need to combine all the data columns you need and then convert them to DT_TEXT). The name of the flat file will contain the name of the city.

After that, you can use a for each loop to loop over your newly generated flat files and do whatever you want to do with the data.




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 #1398909
Posted Thursday, December 20, 2012 7:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:02 PM
Points: 5,259, Visits: 12,193
Koen Verbeeck (12/20/2012)
A very elaborate workaround:

you could use the Export column to export each location to a seperate flat file (you'd need to combine all the data columns you need and then convert them to DT_TEXT). The name of the flat file will contain the name of the city.

After that, you can use a for each loop to loop over your newly generated flat files and do whatever you want to do with the data.


But a flat file is the input to this problem.

Have you somehow guessed what the output requirement is? Hats off if you have



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1398985
Posted Thursday, December 20, 2012 11:11 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 13,564, Visits: 11,375
Phil Parkin (12/20/2012)
Koen Verbeeck (12/20/2012)
A very elaborate workaround:

you could use the Export column to export each location to a seperate flat file (you'd need to combine all the data columns you need and then convert them to DT_TEXT). The name of the flat file will contain the name of the city.

After that, you can use a for each loop to loop over your newly generated flat files and do whatever you want to do with the data.


But a flat file is the input to this problem.

Have you somehow guessed what the output requirement is? Hats off if you have


Yes, but now he has seperate flat files for each location
I guessed he would like to insert the different locations in different tables. That should work with my scenario.




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 #1399205
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse