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: type where it belongs

Re: type where it belongs

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Thu, 11 Sep 2003 07:18:56 -0700
Message-ID: <1063289917.55646@yasure>


Thorsten Kettner wrote:

>I have a table type definition
>
> type t_numbers is table of number
>
>and a function returning this table type
>
> Function GetNumbers(p_min IN number, p_max IN number) RETURN
>t_numbers;
>
>Problem is, I would like to put them in a package to avoid to have
>tens of thousands of types and functions floating freely around some
>day. But it seems I must keep the type outside the package, because
>otherwise the select
>
> select * from table(GetNumbers(100,200))
>
>returns ORA-00902 invalid data type.
>
>It's hard to believe that the dbms looks into the package to find and
>execute the function, but is too lazy to look for the data type
>definition there, too.
>
>Hence the question: Must I change the select somehow? Must I change
>something in the package (maybe specify an export keyword with the
>type)? Or is it really impossible to place the result type in the
>package and be able to select? If so, where does one place enhancement
>requests?
>
>

Define the type in a package header and identify the type in your code as package_name dot type.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Sep 11 2003 - 09:18:56 CDT

Original text of this message

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