Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Embedding a function call in a SELECT statement
In article <enedtb$73f$02$1_at_news.t-online.com>, Maxim Demenko says...
> Jeremy, your function works well in PL SQL, but it is illegal to use PL
> SQL Types in SQL ( the table of number index by binary integer is PL SQL
> datatype). Even if you change the parameter from associative array to
> nested table or varray ( which could be defined in package with TYPE
> NUMARRAY IS ...) it will be still illegal for calls in SQL ( again, in
> pl sql this call should work fine). You can solve it if you create a
> collection type in the database ( with CREATE OR REPLACE TYPE NUMARRAY
> AS ... ) - it should be either nested table or varray, then you can use
> collections as parameter of this datatype in SQL queries.
>
>
Thanks Maxim for that very clear explanation - the stupid thing is that,
as I read your response, I got the uneasy feeling taht actually I knew
that you couldn't use PLSQL types in SQL - so of course your answer
makes perfect sense.
cheers
-- jeremyReceived on Wed Jan 03 2007 - 02:47:01 CST