Conditional Split in detecting incomplete string

  • Dear bro and sis,

    I have a situation like this :

    I have a source file from excel consist of 1 column (just for example)

    This excel file is 100% user input and looks like this :

    Row Column_Name

    1 CHAIR

    2 CHAR

    3 TABLE

    4 TALE

    I want to insert only row 1 and 3 because those row is what i'm searching for (CHAIR, TABLE).

    As for row 2 and 4, i want to generate it to an excel file so user may notice he/she gets wrong in typing the Column_Name and may fix it.

    The problem is : How to split this Column_name as efficient as possible?

    If Column_name only consists of 2 type : CHAIR and TABLE, I would just use the equal operator(==) then union it all to insert to a destination_table.

    But, there are 10 type of this Column_Name. So i guess it wouldn't be nice to look at the SSIS design with conditional split that much 🙂

    Thanx for any idea or suggestion or link that may help me 🙂

  • Build a table of allowed values. Use OpenRowset to query the Excel file, join it to the table of allowed values in the query. Very simple.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Yes it works 100% that way, GSquared 🙂

    It's my mistake posting this question 😛

    Yesterday, i'm obsessed to control user type mismatch for a new record in my table,

    even if that is a completely new record, so there is no way SSIS may know whether it is type mismatch or not.

    Thanx anyway 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

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