Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Nested Decode

573124Apr 1 2008 — edited Apr 1 2008
Hi All

Can v use "Between" operator inside decode function.
Requirement is to get a value from the table by passing date(between passed date and last quarter date) and also match with a particular name.

Example:

select column1,column2,
decode(column3,'NAME',
decode(TO_DATE(column4),between to_date(sysdate) and add_months(to_date(sysdate),-3),1), 0) quarter_results from tablename;

this is the scenario am facing can somebody with a proper solution

Regards,
Naresh Kumar Murali
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 29 2008
Added on Apr 1 2008
20 comments
13,234 views