Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: regr_ functions in 8.1.6
This is just a case of PL/SQL not being up to date with pure SQL. The work-around is to declare a ref cursor type, then use execute immediate to associate the SQL with the ref cursor.
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Practical Oracle 8i: Building Efficient Databases Publishers: Addison-Wesley See a first review at: http://www.ixora.com.au/resources/index.htm#practical_8i More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html Hilary Downing wrote in message <3A3E7598.45F2B881_at_webspan.net>...Received on Mon Dec 18 2000 - 15:09:21 CST
>We're trying to use regr_slope and regr_intercept for trending (to get
>the slope and y-intercept of a line). Using sqlplus, I can type in my
>select statement, for example
>select regr_slope(x,y)
>from some_table
>where ...;
>and it works.
>However, putting the same select into a stored procedure, I get flagged
>on the regr_slope function, saying it needs to be declared (in other
>words, it doesn't recognize that function).
>Any ideas what could be going on? I'm using sqlnet 2.3.4, sqlplus 3.4,
>oracle 8.1.6.
>TIA
>Hilary
>