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: Create a view using OUT values from a procedure - how?

Re: Create a view using OUT values from a procedure - how?

From: Hans Forbrich <news.hans_at_telus.net>
Date: Fri, 08 Oct 2004 20:33:14 GMT
Message-ID: <eQC9d.12$Ia5.1@edtnps89>


Mike wrote:

>
> Hi, I?m creating a view and would like to have two of the columns to
> contain data obtained from a procedure which has two out values. I'm using
> Oracle 9.2
>
> For example
>
> Create view student.v_grades
> (str_student, studentID, str_higrade, str_lowgrade)
> AS
> Select studentdb.student,
> Studentdb.studentID,
> /* How do I get student grades from the procedure */
> FROM studentdb
> WHERE ( ?)
>
>
> e.g. procedure:
>
> Create Procedure PR_getgrades(
> P_higrade OUT VARCHAR2,
> P_lowgrade OUT VARCHAR2
> P_studentID IN Number)
> IS
> BEGIN
>
> /*process data*/
>
> P_higrade := result1;
> P_lowgrade :=result2;
>
> End;
> END PR_getgrades;
> /
>
> Thanks,
>
> Mike

AFAIK, Oracle does not permit using a procedure in the select list as the select list only permits expressions.

Have you tried wrapping the procedure inside a function and calling the function? Or using persistant variable in a package that will be interrogated by and returned from several coordinated functions one of which calls the package (ugh).

/Hans Received on Fri Oct 08 2004 - 15:33:14 CDT

Original text of this message

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