Col001 + Col002

  • When i do a select Col001 + Col002 as combine from table

    if Col002 is null it returns a null value, how can i prevent this. thanks


    </cm>

  • Depends on what the types of columns are.

    One solution is setting a database wide parameter :

    sp_dboption 'database', 'concat null yields null', 'FALSE'

    Or you can use the ISNULL function as in

    col001 + IsNull(Col002, '')

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

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