Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> DECODE question
I'm familiar with how to do a DECODE statement like below to find if the first letter of 'j.Field' = 'R':
DECODE(substr(j.Field,1,1), 'R', 'Yes', 'No')
A similar function testing for numeric criteria does not work:
DECODE (sum(a.Amount), < 10000, 'Yes','No').
How can I check for numeric criteria in SQL and give substitutions based on the results in a manner similar to DECODE?
Thanks,
Mark Hamilton Received on Mon Apr 08 2002 - 18:11:07 CDT
![]() |
![]() |