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

Home -> Community -> Usenet -> c.d.o.misc -> Re: WHERE clause DATE question

Re: WHERE clause DATE question

From: Thierry Brouwers <ThBr_at_mail.dma.be>
Date: 11 Mar 1999 22:20:20 GMT
Message-ID: <01be6c0d$79fdbf80$ab0eeec3@default>


You can use the add_months function (or add_month, I don't have a manual closeby).
Although the function name suggests otherwise, you can also go back x months.
This is done by simply specifying a negative number.

eg. select cust_id from customer where last_order_date > add_months(sysdate, -6)

Hope this helps you.
Greetings

   Thierry Brouwers

Rich D <rdolan_at_fraingroup.com> wrote in article <7c9eep$v3$1_at_eve.enteract.com>...
> I need to create a view using a WHERE clause that involves a date column.
 I
> would like to see records with a date within the last 6 months only. I
am
> assuming that I need to do something using SYSDATE, but I haven't seen
how
> to get what I need.
>
> Does anyone have any suggestions?
>
> Thanks,
>
> Rich Dolan
>
>
>
>
Received on Thu Mar 11 1999 - 16:20:20 CST

Original text of this message

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