fahVB
asked on
Case stmt
I have 2 diff fields, code which is always "1M" and inv_cd which is 001 and 002...in my following case stmt i would to say that if code is 1M then 'FM' but if inv_cd has 002 then SOLDMTG, in following stmt i am getting all FM even in some inv_cd there is 002, is this possible?
case when code = '1M' then 'FM' when inv_cd = 002 then 'SOLDMTG' end as PRODID
case when code = '1M' then 'FM' when inv_cd = 002 then 'SOLDMTG' end as PRODID
ASKER
I tried with commas but still get all FM
ASKER
and yes it is char(3)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i didn't know that, thank you ...it worked
Open in new window