LIke in conditional split

  • Hello All,

    How do I evaluate below given expression in Conditional split in SSIS?

    description like '[0-9]_%'+char(32)+'%' ??

    Thanks in advance

  • try...some thing like this...

    SUBSTRING( «character_expression», 1, 1 ) >= 0

    && SUBSTRING( «character_expression», 1, 1 ) <=9

    && SUBSTRING( «character_expression», 2, 1 ) = "_"

    && SUBSTRING( «character_expression», FINDSTRING( «character_expression», «string», «occurrence» ), 1 ) = char(32)

    RB

  • Thanks,

    Actually I tried this

    (SUBSTRING([Copy of Description],1,1) == "0" || SUBSTRING([Copy of Description],1,1) == "1" || SUBSTRING([Copy of Description],1,1) == "2" || SUBSTRING([Copy of Description],1,1) == "3" || SUBSTRING([Copy of Description],1,1) == "4" || SUBSTRING([Copy of Description],1,1) == "5" || SUBSTRING([Copy of Description],1,1) == "6" || SUBSTRING([Copy of Description],1,1) == "7" || SUBSTRING([Copy of Description],1,1) == "8" || SUBSTRING([Copy of Description],1,1) == "9")

    and it worked, it gave same results as query.

  • I don't see how - that expression looks only at the first letter of [Copy of Description] whereas your query does much more.

    To me, yours looks equivalent to this:

    (SUBSTRING([Copy of Description],1,1) >="0" && SUBSTRING([Copy of Description],1,1) <= "9")

    clearly not the same.

    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.

  • Yes thts true they are not same,

    Its just that i no more require to look for space(char(32)), only looking at first character solved purpose..

    Thanks a lot!

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

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