CASE WHEN TRIM(Cast(decile as varchar(3))) ='' THEN 'U'
ELSE Trim(Cast(decile as varchar(3))) END decile
where model_name = 'TopTier'
Note : decile is tinyint of length 3 in table 1
I want this select statement to return 'U' as there are no records for model name :TopTier in table 1.
But this statement is returning 0 records. Please correct this statment.