RE: Decode function

From: SHEEHAN, JEREMY <Jeremy.Sheehan_at_fpl.com>
Date: Wed, 29 Jul 2009 16:36:23 -0400
Message-ID: <8833494F383585499CB855121711D2631CCD1B522A_at_JBXEXVS02.fplu.fpl.com>



That solves my problem! Thanks!!

Jeremy
P Consider the environment. Please don't print this e-mail unless you really need to.

From: Bellows, Bambi (Comsys) [mailto:bbel5_at_allstate.com] Sent: 29 July, 2009 4:34 PM
To: SHEEHAN, JEREMY; Oracle L
Subject: RE: Decode function

Not as such, but I do this all the time by use of the sign function.

For example, if you want to return X if val> 100, Y if it's less, and Z if it's equal , you can do:

select decode(sign(val-100),-1,'X',1,'Y',0,'Z','error') from dual;



From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of SHEEHAN, JEREMY Sent: Wednesday, July 29, 2009 3:29 PM
To: Oracle L
Subject: Decode function

I think the answer is no, but can you set greater than, less than conditions in a decode function?

TIA!! Jeremy
P Consider the environment. Please don't print this e-mail unless you really need to.

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jul 29 2009 - 15:36:23 CDT

Original text of this message