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
milford_f
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,
Milford.
Re: Calculation using Discoverer [message #184115 is a reply to message #184112] Tue, 25 July 2006 07:46 Go to previous message
gold_oracl
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: Mon Dec 05 06:49:43 CST 2016

Total time taken to generate the page: 0.12092 seconds