Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> RE: A simple SELECT ?
be very careful with your date math
sysdate-10 means this:
SYSDATE ` SYSDATE-10 05/27/1999 3:24:40 PM 05/17/1999 3:24:40 PM
Try this
to_date(sysdate-10, 'dd-mon-yyyy')
it returns
05/17/1999
-----Original Message-----
From: Sherwin [mailto:sherwin_at_blr.sni.de]
Sent: Friday, May 21, 1999 8:27 AM
To: comp.databases.oracle.server_at_list.deja.com
Subject: Re: A simple SELECT ?
Hi there,
Take a look at the statement below and see if you like it...
SELECT CUSTOMER_ID , QUANTITY, DDATE
FROM DELIVERIES
WHERE DDATE >= SYSDATE -10
ORDER BY CUSTOMER_ID.
Sherwin
SIEMENS
"ACT_at_BLUEGATE" wrote:
> It seems simple...
>
> I've a deliveries table with three columns: date, customer id, and
quantity.
>
> How can i retrieve in a query the last (in time) 10 deliveries for a
> specified customer ?
>
> Achille Carette, Bluegate
> act_at_bluegate.be
Received on Thu May 27 1999 - 17:24:28 CDT
![]() |
![]() |