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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CASE with multiple criteria

Status
Not open for further replies.

Atrzy

IS-IT--Management
Aug 18, 2003
11
0
0
US
Is it possible to write a CASE statement using AND?

Here's an example of what I'm trying to do:
If Location = 0001E and Jobcode = 900922
Then return Director
If Location = 0001 and Jobcode = 900922
The return Allocator
Else NA

I don't know how to properly write the CASE statement.
I'm on Oracle 9, using Report Smith 3.0

Thanks for any help you can give me!
 
Yes...you'd write it like this:

Case
When Location = '0001E' and Jobcode = '900922'
Then 'Director'
When Location = '0001' and Jobcode = '900922'
Then 'Allocator'
Else 'NA' End
 
That worked. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top