Re: Need Help with PL/SQL

From: Dan Chen <chen_at_duq3.cc.duq.edu>
Date: 1996/10/23
Message-ID: <326E1B68.7260_at_duq3.cc.duq.edu>#1/1


atyagi_at_mc.xerox.com wrote:
>
> Hi everybody,
>
> Thanks to all those who helped me last time. I have another question
> for you! I have written this query and I want to restrict the total number
> of records returned to exactly 100. I am trying and I can not make it work. I
> will greatly appreciate any suggestion.
>
> SELECT EO_SHIPPED.SHIP_DATE, COUNT(EO_SHIPPED.ORDERNUM)
> FROM WHISC.EO_SHIPPED EO_SHIPPED
> WHERE (EO_SHIPPED.SHIP_DATE >=ADD_MONTHS(SYSDATE,-5))
> AND (TO_CHAR(EO_SHIPPED.SHIP_DATE,'DAY') NOT LIKE 'S%')
> GROUP BY SHIP_DATE;
>
> You can email me directly to atyagi_at_mc.xerox.com or post the reply
>
> Thanks again
>
> Amit Tyagi
>
> Xerox Corp.

Have you tried to add 'and ROWNUM <= 100' in your WHERE clause? I think it will work for you. Good luck.

Dan Chen
PHRI Received on Wed Oct 23 1996 - 00:00:00 CEST

Original text of this message