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

Home -> Community -> Usenet -> c.d.o.server -> RE: A simple SELECT ?

RE: A simple SELECT ?

From: Ethan Post <EPost_at_safeskin.com>
Date: Thu, 27 May 1999 15:24:28 -0700
Message-ID: <9F9A2FF519D2D2119A870008C739786D2C0354@hq-exch-02.safeskin.com>


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

Original text of this message

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