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: Analytic Functions in Stored Procedure 8.1.7 - do they work?

Re: Analytic Functions in Stored Procedure 8.1.7 - do they work?

From: Charlie Brown <cbrown_at_ghx.com>
Date: 19 Jan 2004 08:00:48 -0800
Message-ID: <dfd4623d.0401190800.21936ad6@posting.google.com>


"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message news:<buegt7$js$1_at_hercules.btinternet.com>...
> As you've found, pl/sql in 8.1.7 does not
> recognise analytic functions. The standard
> workaround is to use weak ref cursors:
>
> declare
> type ref_cursor is ref cursor;
> c1 ref_cursor;
> begin
> open c1 for 'select .....';
>
> loop
> fetch c1 into {list of variables};
> exit when c1%notfound;
> end loop;
>
> end;
> /
>
>
> As another poster suggested, you could hide the
> analytic functions inside a view, but you may find
> that Oracle instantiates the entire view before
> applying any predicate you want to use. This
> may make the view extremely inefficient.
>
>
> --
> Regards
>
> Jonathan Lewis
> http://www.jlcomp.demon.co.uk
>
> The educated person is not the person
> who can answer the questions, but the
> person who can question the answers -- T. Schick Jr
>
>
> Next public appearance2:
> March 2004 Hotsos Symposium - Keynote
> March 2004 Charlotte NC - OUG Tutorial
> April 2004 Iceland
>
>
> One-day tutorials:
> http://www.jlcomp.demon.co.uk/tutorial.html
>
>
> Three-day seminar:
> see http://www.jlcomp.demon.co.uk/seminar.html
> ____UK___February
>
>
> The Co-operative Oracle Users' FAQ
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Thank you Jonathan, I'll pursue that with my dba. You are correct also about the view option...couldn't go there because I must apply a predicate first. Received on Mon Jan 19 2004 - 10:00:48 CST

Original text of this message

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