Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle 8i SQL Statement
When using the DECODE function, is there any way of passing it the
IN() clause?
Example:
DECODE(FIELDNAME,IN(1,2,3),TRUE,FALSE)
This returnning TRUE if the values of 1, 2 or 3 are found. So far the
only way I can get this to work is as follows:
DECODE(FIELDNAME,1,TRUE,2,TRUE,3,TRUE,FALSE) "This leaving a lot of room for typo errors."
Thank you.
Kent Prokopy
Received on Fri Sep 19 2003 - 06:53:54 CDT
![]() |
![]() |