SSIS Derived column syntax

  • Hi

    How would one add this as a derived column

    CASE

    WHEN Data IS NULL

    THEN NULL

    WHEN SUBSTRING(REPLICATE('0', 9 - LEN(Data)) + CAST(CYCLE_YYYYMM AS VARCHAR(9)), 4, 6) IS NULL

    THEN 0

    ELSE RTRIM(SUBSTRING(REPLICATE('0', 9 - LEN(Data)) + CAST(Data AS VARCHAR(9)), 4, 6))

    END

    From what I have seen the first option is not really required

  • I was advised previously that using SSIS for this was not really going to give me a performance boost compared to running a insert into with the case statements defined, I need to test this somehow and go through all the options available to get some speed increase. Any help with the Syntax in the derived column would be greatly appreciated

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

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