SQL Language (MOSC)

MOSC Banner

Need Asistance Uisng Bind Variable within SQL

edited Feb 28, 2011 12:30AM in SQL Language (MOSC) 19 commentsAnswered
 Hope thie is the right forum

I am trying to figure out how to use a bind variable in the "Where -NOT IN" clause when the bind varialbe needs to be a list of numbers

id defined as number(10)

original sql:

select
id,
name
from
test_table
where
id NOT IN (10888955,11138235,11138236,27731942,27732162)
order by
name;

needed sql using bind variable:

select
id,
name
from
test_table
where
id NOT IN (:v_ids)
order by
name;

How would I define the list using a bind variable (:v_ids)  or can I ?

Thanks

Jim

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