Derived column

  • I am new to SSIS..Below code is showing compile error means showing red in the derived column when below code be written.

    I am trying to achieving when the TED value is "Yes" then output should be 1 and TED is null or "No" the output value should be 0..

    Please advise..

    CASE WHEN TED ="Yes" THEN 1

    WHEN TED ="No" THEN 0

    WHEN TED = "" THEN 0

    WHEN TED is null THEN 0

    ELSE TED END

  • Hi MVS2k11

    You don't have CASE statement, you should use in-line IF, your condition is equivalent to

    ISNULL(ted) ? 0 : (ted = "Yes" ? 1 : 0 )

    Cheers,

    Hope this helps,
    Rock from VbCity

  • Thanks a lot..

    It works..

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

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