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: Howard Lee Harkness <hl_harkness_at_my-dejanews.com>
Date: Fri, 21 May 1999 17:52:12 GMT
Message-ID: <7i46gb$5c7$1@nnrp1.deja.com>


In article <7i3sr8$js8$1_at_xenon.inbe.net>,   "ACT_at_BLUEGATE" <act_at_bluegate.be> 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 ?

This is not the sort of thing that SQL does easily (at least, I don't think so). However, you might try writing a PL/SQL stored procedure with a cursor that reads the deliveries information in date order and stores the results in a PL/SQL table and counts them, then outputs the last ten entries in the PL/SQL table.

--
Replies send to this email address are automatically discarded. To reply, please post in this newsgroup, or email to (make the obvious substitutions) harknessATskepticsDOTorg

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Fri May 21 1999 - 12:52:12 CDT

Original text of this message

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