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: ResultSet from Stored Procedure

Re: ResultSet from Stored Procedure

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 26 Jun 2002 08:00:33 -0700
Message-ID: <afckuh01gtr@drn.newsguy.com>


In article <ce60f507.0206252354.7db0d476_at_posting.google.com>, Rene.Nyffenegger_at_gmx.ch says...
>
>> ops$tkyte_at_ORA817DEV.US.ORACLE.COM> create or replace function f return
>> myTableType
>
>[.....]
>
>>ops$tkyte_at_ORA817DEV.US.ORACLE.COM> select * from table( cast( f() as myTableType
>> ));
>
>
>[.....]
>
>
>Hello. I found it very interesting that it's possible to have a function
>return a table type and select * on that function's output. However,
>I don't know why there must be a cast from f() to myTableType. f() is
>already declared to return myTableType.
>

in 8i, you need the cast to make the compiler happy.

in 9i, you don't

>Can someone give me a hint?
>
>Rene

--
Thomas Kyte (tkyte@oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Wed Jun 26 2002 - 10:00:33 CDT

Original text of this message

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