Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to use VARRAY in IN clause

629026Feb 25 2011 — edited Feb 25 2011
My requirement goes like this

SS_ADDR_AVA_ARR is a VARRAY

SELECT SOURCE_NAME BULK COLLECT INTO SS_ADDR_AVA_ARR FROM SOURCE_SYSTEM_CONFIG_TABLE WHERE ADDR_DATA_AVAILABLE='Y';

I would like to check the values of VARRAY in a single shot instead of LOOPING,
But PL/SQL doesn't allow SUBQUERYING as below

EXIT WHEN V_DG.SOURCE_NAME NOT IN (SELECT * FROM TABLE(SS_ADDR_AVA_ARR AS VARCHAR2));

OR

IF V_DG.SOURCE_NAME NOT IN (SELECT * FROM TABLE(SS_ADDR_AVA_ARR AS VARCHAR2)) THEN
--CODE

END IF;

How to go ahead with this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2011
Added on Feb 25 2011
3 comments
1,917 views