Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Embedding a function call in a SELECT statement

Re: Embedding a function call in a SELECT statement

From: Jeremy <jeremy0505_at_gmail.com>
Date: Wed, 3 Jan 2007 08:47:01 -0000
Message-ID: <MPG.20057ddf4998f2a598a3b9@news.individual.net>


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

-- 
jeremy
Received on Wed Jan 03 2007 - 02:47:01 CST

Original text of this message

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