using conditional split how to load from source to destination table where the condition is null or blank to a particular column

  • using conditional split how to load from source to destination table where the condition is null or blank to a particular column

  • jyothi_siri2000 (1/27/2011)


    using conditional split how to load from source to destination table where the condition is null or blank to a particular column

    Use 2 conditions:

    one that checks if the column is null.

    One that checks if the column has zero string length.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • where col1 is null

    and col2 = ""

    -----------------------------
    www.cbtr.net
    .: SQL Backup Admin Tool[/url] :.

  • Oberion (1/27/2011)


    where col1 is null

    and col2 = ""

    The original requirement was to check for the same column, not two different columns.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • jyothi_siri2000 (1/27/2011)


    using conditional split how to load from source to destination table where the condition is null or blank to a particular column

    Hi ,

    Is this you are looking for

    declare @Temp table (i int null)

    insert into @temp values (1),(null),(''),(2)

    Select * from @Temp where (i is null or i='')

    Thanks

    Parthi

    Thanks
    Parthi

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

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