nvl function

  • What is the equivalent of nvl2 in tsql? Plus the data types are different depending on the column (text, bit, int) :crazy:

  • I think you would have to use a case statement to achieve the same funtionality. If the datatypes are different you can convert them to a commen type in the case statement.

    Select Case WHEN 'TEST' IS NULL THEN cast(1 as varchar(1000)) ELSE 'B' END

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

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