none
Case statement in SSIS

    Question

  • How to write the below case statement in SSIS

    CASE WHEN LEN(ADDRESS1)+2>LEN(ADDRESS2) AND LEN(ADDRESS1)+2>LEN(ADDRESS3) AND ADDRESS1 LIKE '%[A-Z]%' AND ADDRESS1 LIKE '%[0-9]%' THEN ADDRESS1

    WHEN LEN(ADDRESS2)>LEN(ADDRESS1) AND LEN(ADDRESS2)>LEN(ADDRESS3) AND ADDRESS2 LIKE '%[A-Z]%' AND ADDRESS2 LIKE '%[0-9]%' then ADDRESS2

    WHEN LEN(ADDRESS3)>LEN(ADDRESS1) AND LEN(ADDRESS3)>LEN(ADDRESS2) AND ADDRESS3 LIKE '%[A-Z]%' AND ADDRESS3 LIKE '%[0-9]%' then ADDRESS3

    WHEN ADDRESS1 LIKE '%[A-Z]%' AND ADDRESS1 LIKE '%[0-9]%' THEN ADDRESS1

    WHEN ADDRESS2 LIKE '%[A-Z]%' AND ADDRESS2 LIKE '%[0-9]%' AND LEN(ADDRESS2)>10 THEN ADDRESS2

    WHEN ADDRESS3 LIKE '%[A-Z]%' AND ADDRESS3 LIKE '%[0-9]%' AND LEN(ADDRESS3)>10 THEN ADDRESS3

    ELSE ADDRESS1

    If it is possible through script component, please provide the sample code..

    Tuesday, May 14, 2013 2:44 AM

Answers

All replies