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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: DECODE or not to DECODE

RE: DECODE or not to DECODE

From: Denham Eva <EvaD_at_TFMC.co.za>
Date: Tue, 05 Aug 2003 06:04:23 -0800
Message-ID: <F001.005C905A.20030805060423@fatcity.com>


Thanks To all for the support!
I managed to use a combination of thesuggestions which worked great!

Denham

-----Original Message-----
Sent: Monday, August 04, 2003 4:24 PM
To: Multiple recipients of list ORACLE-L

Hello Listers,

I need some help please,
I am trying to create a DECODE statement, on a date column and looks something like this, but does not work.
SELECT COL1,

                COL2,
                DECODE((SYSDATE - COL_DATE), <= 30, '30_days', NULL) Days30,
                DECODE((SYSDATE - COL_DATE), (between 31 and 60), '60 Days',
NULL) Days60,
......
......
FROM ACCOUNT_TBL
WHERE COL = '0' Obviously, I have worked out that this can not be done. The problem is also that the server is 7.3.4 and I need to use the code in a view. Does anyone have any solutions/work arounds for this? Any help will be appraciated.

TIA
Denham Eva
Oracle DBA




This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal

For more information please visit www.marshalsoftware.com



############################################################################
#########
Note:
This message is for the named person's use only. It may contain confidential,
proprietary or legally privileged information. No confidentiality or privilege
is waived or lost by any mistransmission. If you receive this message in error,
please immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender. You must not, directly or indirectly,
use, disclose, distribute, print, or copy any part of this message if you are not
the intended recipient. TFMC and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks.

Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorized to state them to be the
views of any such entity.

Thank You.
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Denham Eva
  INET: EvaD_at_TFMC.co.za

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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).


This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal

For more information please visit www.marshalsoftware.com





This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal

For more information please visit www.marshalsoftware.com


#####################################################################################
Note:
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. TFMC and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks.

Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.

Thank You.
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Denham Eva
  INET: EvaD_at_TFMC.co.za

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Tue Aug 05 2003 - 09:04:23 CDT

Original text of this message

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