July 27, 2015

Case statement in Where clause

where x = 1
and
(
case when y in ('O', 'P', 'H') then 'A'
else 'I'
end
) = 'I'
and z = 4

July 16, 2015

Coalesce

SELECT COALESCE(currency,'Dollar') as display_currency