Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Numeric comparison in DECODE statement
You can also implement your logic as
SELECT DECODE(SIGN(in_value-60),
-1, TO_CHAR(in_value)||' minutes', TO_CHAR(in_value/60, '9.99')||' hours')FROM dual
HTH
Raj
QOTD: Any clod can have facts, but having an opinion is an art!
-----Original Message-----
Sent: Monday, May 20, 2002 11:38 AM
To: Multiple recipients of list ORACLE-L
Robert,
That won't work. Decode works like a switch statement. If condition 1
then
value 1. You can't imbed logic operators therein.
DickG.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jamadagni, Rajendra INET: Rajendra.Jamadagni_at_espn.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon May 20 2002 - 11:08:36 CDT
- text/plain attachment: ESPN_Disclaimer.txt