Precompilers and OCI (MOSC)

MOSC Banner

Is there a way to execute: 'select ... from table1 where k1 in :list_of_values' through OCI?

edited Feb 20, 2012 6:45AM in Precompilers and OCI (MOSC) 4 commentsAnswered

 

Question: Is there a way to execute: 'select ... from table1 where k1 in :list_of_values' through OCI?

Question is specifically on 'list_of_values' in the WHERE clause: How to bind a list of values?


Trying is to use OCI Collection with query was like: select ... from table1 where k1 in (select * from table(cast(:list_of_values as MyType))), and it failed with ORA-21500. (*Note*)

Trying to use query like: select ... from table1 where k1 in (select * from table(:list_of_values)), the type of list_of_values is TABLE of INTEGER and fails with the same ORA-21500.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center