I want to use arithmetic operator ">" in function "Decode"
Date: 9 Oct 2001 07:05:55 -0700
Message-ID: <5016f0aa.0110090605.4cbd4de4_at_posting.google.com>
Hi,
See below SQL statement
SELECT DECODE (TO_NUMBER('1'), 1, 'T', 'F' ) FROM DUAL [Quoted] [Quoted] As you could guess, this works well...Then how about next one?
SELECT DECODE (:A > 1, 1, 'T', 'F' ) FROM DUAL OR
SELECT DECODE (10 > 1, 1, 'T', 'F' ) FROM DUAL OR
SELECT DECODE ((10>1), 1, 'T', 'F' ) FROM DUAL [Quoted] All these makes error "ORA-00907:missing right parenthesis.".
I wonder why these are not allowed under oracle 8.0.
Is this impossible?
If any of you have a idea to enable this expression, plz let me know.
Thanks in advance.
Regards,
Ryan
-p.s
As for my opinion:
I've searched all Oracle documents and found that
(:A>10) or (10>0) are not "Expressions" and so these are not allowed to
be used as a first parameter of "Decode" function.
If this is the "right" reason of error I think Oracle should allow this..Isn't it? :-)
BTW, is this the "right" reason? Received on Tue Oct 09 2001 - 16:05:55 CEST