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 use stored procedures as a select column

Re: How to use stored procedures as a select column

From: Andrzej Zabludowski <andrzej_at_oke.pl>
Date: Fri, 10 Jan 2003 11:18:34 +0100
Message-ID: <3E1E9DFA.EDEADF17@oke.pl>


It works !
Thank you a lot.

AZ

Matthias Rogel wrote:
>
> hi andrzej
>
> U have to use a function
>
> CREATE OR REPLACE FUNCTION some_stored_function(input NUMBER) return
> VARCHAR2 AS
> ....
>
> matthias
>
> Andrzej Zabludowski wrote:
> > Hi,
> >
> > Is it possible to call stored procedure as a column in select statment ?
> > (Oracle 8.0.6)
> >
> > It will be vary nice if I can create a view as below:
> >
> > CREATE OR REPLACE VIEW MY_VIEW
> > (
> > V_ID,
> > V_NAME,
> > V_VALUE
> > )
> > AS
> > (
> > SELECT
> > SOME_TABLE.ID,
> > SOME_TABLE.NAME,
> > some_stored_procedure(SOME_TABLE.PARAM)
> > FROM SOME_TABLE
> > WHERE /some conditions/
> > )
> >
> > where some_stored_procedure is defined as:
> >
> > CREATE OR REPLACE PROCEDURE some_stored_procedure(input in NUMBER,
> > output out VARCHAR2 ) AS
> > temp varchar2(20);
> > BEGIN
> > /some complicated operations where tmp value is count/
> >
> > output:= tmp;
> > END;
> >
> > I try to do it but I recive "invalid column name" during view creation.
> >
> > Any help would be greatly appreciated.
> >
> > Best regards,
> > Andrzej Zabludowski
Received on Fri Jan 10 2003 - 04:18:34 CST

Original text of this message

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