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.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • 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