I’m trying to make a calculated field for job type using the Job prod table, but it doesn’t distinguish between make make to stock and make to job types. Guessing it doesn’t accept the IS NULL argument for target job num. Is there a better way to write this?
case
when JobProd.OrderNum = 0 AND JobProd.TargetJobNum IS NULL then ‘MTS’
when JobProd.OrderNum > 0 then ‘MTO’
else ‘MTJ’
end