Home » SQL & PL/SQL » SQL & PL/SQL » Calculation using Discoverer
Calculation using Discoverer [message #184112] Tue, 25 July 2006 07:37 Go to next message
Messages: 18
Registered: July 2006
Junior Member
Hi everybody,

I need some help, I am creating a report of my stock inventory and trying to pick up items with expirty date less than today.

DECODE(MONTHS_BETWEEN(TO_DATE(Stock Expiry Date),SYSDATE),'<0',Stock Expiry Date,NULL)

Item code | Stock expiry Date
4007 | 07-JAN-2008
4008 | 04-MAR-2006
4008 | 29-ARP-2005

Thanks in advance,
Re: Calculation using Discoverer [message #184115 is a reply to message #184112] Tue, 25 July 2006 07:46 Go to previous message
Messages: 129
Registered: July 2006
Location: Westborough, MA
Senior Member
Hi Milford,
why this my complication....

you can use simply like

select * from table_name where Stock_Expiry_Date<sysdate;

Previous Topic: Middle Most Record in a Table
Next Topic: DEODE function - how many arguments?
Goto Forum:

Current Time: Sun Aug 20 00:57:52 CDT 2017

Total time taken to generate the page: 0.11653 seconds