Hi everyone. I need help with my Case statement or another recommended solution.
I have a table named JOB and a table named COMPLAINT. I need to retun a column with the name TYPE with a value of 'TYPE5' or 'TYPE1' based on a value in another table. Here is what I have. I am getting a syntax error. Am I missing something small or do I need to go about this in a different manner.
SELECT CUSTOMERNO, JDATE,
(SELECT TRIM(TYPE) FROM COMPLAINT WHERE COMPLAINT.JOBNO = JOB.JOBNO = '5') THEN 'TYPE5'
(SELECT TRIM(TYPE) FROM COMPLAINT WHERE COMPLAINT.JOBNO = JOB.JOBNO = '1') THEN 'TYPE1'