Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to use stored procedures as a select column
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:12:22 CST
![]() |
![]() |