I'm trying to figure out how to write a nested CASE WHEN statement but not sure how to do it exactly. I have 2 conditions that I need to look at.
CASE WHEN S.fstatus = 'Awaiting Approval' THEN S1.fprodcl ELSE CASE WHEN J1.WorkCenterName IS NULL THEN '04' As ELSE '01' END As NewProdCL
Does that look correct?? Basically its supposed to say IF S.fstatus = 'Awaiting Approval' Then S1.fprodcl and IF S.fstatus <> 'Awaiting Approval' THEN IF J1.WorkCenterName IS NULL THEN '04' ELSE '01'