Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IN statement within a CASE statement

Status
Not open for further replies.

AtlPayroll

Technical User
Dec 18, 2006
8
US
I'm creating a Derived field.

I've got a CASE statement that currently works:
CASE "JOB"."JOBCODE"
WHEN 'COP367'
THEN 'YES'
ELSE 'NO'
END

What I'm needing is to incude a an IN statement
CASE "JOB"."JOBCODE"
WHEN IN('COP367','COP368','COP369')
THEN 'YES'
ELSE 'NO'
END

But I get an ORA-00936: missing expression error. Does anyone know what I'm doing wrong?

Thanks,
 
Try this:

CASE WHEN "JOB"."JOBCODE" IN('COP367','COP368','COP369')
/* You could put some comments in here */
THEN 'YES'
/* You could put some comments in here */
ELSE 'NO'
END

Specializing in ReportSmith Training and Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top