I need to have part of a question not have Like and the other to have like - can't seem to get both to reside in the same statement...
In SQL 2000
It appears that the WHEN word needs to be AFTERthe field unless I use the LIKE then the WHEN needs to be BEFORE the field ... as in:
Case payrolcd WHEN 'ermedp' then uprtrxam
Case WHEN payrolcd like 'erm%' then uprtrxam
I am trying to encompass both in the same statement w/ a sum - something like:
SUM(CASE pyrlrtyp WHEN 2 THEN
case payrolcd when 'ermedp' then uprtrxam
when like 'fer%' then uprtrxam
ELSE 0 END ELSE 0 END) ,
Any way to do this ...