You need to return NULL only if the value of your data is a certain value. How do you do this? There are three different ways. NULLIF DECLARE @1 char (1) SELECT @1 = 'D' SELECT NULLIF (@1 ,'D' ) REPLACE This should not really be used, I just added it
Read More...