Tuesday, 20 August 2013

ISNULL twice for the same column

ISNULL twice for the same column

Is it possible to use ISNULL twice for the same column?
ISNULL(ISNULL(column, SELECT sum(column2) FROM table WHERE type = '1')),
SELECT sum(column2) FROM table WHERE type = '2'))
Or should I be doing this in a different way with IF ELSE somehow? How
would that look like?

No comments:

Post a Comment