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

Home -> Community -> Usenet -> c.d.o.tools -> Ref Cursor in Oracle Stored Procure

Ref Cursor in Oracle Stored Procure

From: Sunny <sunnysearch_at_yahoo.com>
Date: 15 Jun 2001 22:57:19 -0700
Message-ID: <4a1d2952.0106152157.3581b2cf@posting.google.com>

Hello there,

    Can any body help me in use of ref cursor in oracle stored procedure.
I am using oracle ref cursor in stored procedure/function which will return a ref cursor to calling program.

    I am not getting, how to use 'alias' in order by clause in a query which is used in ref cursor.

    I have ref cursor in stored procedure as :

open refCurs for

	select FirstName, Lastname, Average*sin(degree)*sqrt(memo) X
			 From UserData 
			 where FirstName like 'Su%'
			 ORDER BY
			 X*0.5 - 5*(sqrt(X+(X-5));

     where refcurs is object of ref cursor and usedata is a oracle 
     table containg above listed fields.
   

Here I do not want to use formula for X in order by clause as it will be repeated in order by clause. Instead I want to use alias 'X' to order the result. Received on Sat Jun 16 2001 - 00:57:19 CDT

Original text of this message

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