multiple conditional splits in ssis

  • 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?????

  • 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?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • 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 🙂

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply