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


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 10:54 AM
Points: 4,238, Visits: 9,479
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:

http://www.sqlservercentral.com/articles/Best+Practices/61537/

If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
Post #1398894
Posted Thursday, December 20, 2012 4:49 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 7:39 AM
Points: 9,370, Visits: 6,467
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


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 10:54 AM
Points: 4,238, Visits: 9,479
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:

http://www.sqlservercentral.com/articles/Best+Practices/61537/

If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
Post #1398985
Posted Thursday, December 20, 2012 11:11 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 7:39 AM
Points: 9,370, Visits: 6,467
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