Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> DECODE question

DECODE question

From: Mark Hamilton <user_at_user.net>
Date: Mon, 8 Apr 2002 15:11:07 -0800
Message-ID: <ub48rmdhd2s3b3@corp.supernews.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US