Replace Values in SSIS Expression

  • Hi Please find my expression as below in Derived Column in SSIS , I have it for ISNULL then replacing it with empty String . Now i need to Replace if Animal == Cat then Replace it with Dog . Can some one help me in achieving this expression . Thanks in Advance

    ISNULL([Animal) ? "" :[Animal]

  • Is this what you want? You may want to add in a case check

    ISNULL([Animal]) ? "" : ( [Animal] == 'Cat' ? 'Dog' : [Animal])

  • Should you decide to throw in a Pig and a Donkey as well, I'd suggest resorting to a lookup table rather than expanding out the code to a nesting nightmare.

    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.

  • Thank you so much .. that worked for me

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

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