Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question about Passing Arrays to PLSQL
billmil_at_my-deja.com wrote:
>
> How can a PLSQL function receive an incoming list and use that list in
> an SQL statement?
>
> E.g., I'd like a PLSQL function to execute an sql such as:
> select * articles where area in (list_in);
>
> where list_in would look like
> "finance, technology, cooking"
>
> (The calling java program would pass in list_in)
>
> I know I can build a statement using dynamic sql, but I'd like to avoid
> the extra parsing overhead.
>
> Any suggestions? For you java-folks, can I use a java.sql.types.array?
>
> tnanks in advance.
>
> bill milbratz
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
You can cast a pl/sql table to rows which you could then use as a subselect. You can find an example I think at:
www.jlcomp.demon.co.uk
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Fri Apr 14 2000 - 00:00:00 CDT