Reputation: 23
I have
Select
isnull(s1.column, s.column) Supplier
from table
where
I am not sure what to put in the where to filter by supplier name when using the isnull.
Upvotes: 2
Views: 39
Reputation: 726499
Since there is no actual Supplier
column, put your filtering condition on the isnull(s1.column, s.column)
expression:
SELECT
ISNULL(s1.column, s.column) Supplier
FROM MyTable
WHERE ISNULL(s1.column, s.column) = 'DesiredValue'
Upvotes: 2