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

Home -> Community -> Usenet -> c.d.o.misc -> Re: %%How to <efficiently> do: SELECT MAX(Date)...WHERE Date < myParamDate

Re: %%How to <efficiently> do: SELECT MAX(Date)...WHERE Date < myParamDate

From: Raoul de Kezel <100653.2230_at_compuserve.com>
Date: 1997/10/14
Message-ID: <MPG.eadf6c3dbf841d7989682@149.174.183.124>#1/1

In article <61tjpg$1ma_at_hpg30a.csc.cuhk.edu.hk>, william_at_alumni.cuhk.edu.hk says...
> declare
> cursor cu_max_rate is
> select rating
> from rating
> order by rdate desc;
>
> max_rate number;
> begin
> open cu_max_rate;
>
> fetch cu_max_rate
> into max_rate;
>
> close cu_max_rate;

BTW, do we need to explicitly close a cursor local to a block, or is it closed automatically when it goes out of scope ?

> end;

Received on Tue Oct 14 1997 - 00:00:00 CDT

Original text of this message

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