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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).