Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: A simple SELECT ?
Hi Again,
May be you need something like this. I'm not sure if I understood your requirement well.
But have tried to point in a direction that might help you. Bye!
SELECT * from deliveries
WHERE to_char(ddate,'SSSS') IN (select to_char(ddate,'SSSS')-10 from del) OR
to_char(ddate,'SS') IN (select to_char(ddate,'SS') -10 from del) OR
to_char(ddate,'MI') IN (select to_char(ddate,'MI') -10 from del) OR
to_char(ddate,'HH') IN (select to_char(ddate,'HH') -10 from del) OR
to_char(ddate,'DD') IN (select to_char(ddate,'DD') -10 from del) OR
to_char(ddate,'MON') IN (select to_char(ddate,'MON'') -10 from del) OR
to_char(ddate,'YYYY') IN (select to_char(ddate,'YYYY') -10 from
del)
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 Fri May 21 1999 - 10:57:09 CDT
![]() |
![]() |