ali.m.habib (10/10/2013)
I want to select top 1 value either null or value from this query
select top 1 column5 from table2 where table2.column1ID = 5
if the whole value of this column is null the return is empty , but I need to return value or null
How about
With criteria AS (
SELECT 5 AS column1ID)
SELECT top 1 column5 from
criteria c
LEFT OUTER JOIN table2 t ON c.column1ID = t.column1ID