sql - Declaration of multiple values in Oracle BIND Variables -



sql - Declaration of multiple values in Oracle BIND Variables -

i trying pass multiple values 3000 values, bind variable in oracle sql plus command prompt like..

select job emp job in :job -- bind variable value

i want see result, values in emp table on column job matching variable list has fetched out.

as beingness production environment can't create tables have grant on select clause.

need more info on how executed when run same query unix-sql plus environment.

will prompt asking come in bind variables values or can refer file has values as... :job1 := 'manager' :job2 := 'clerk' :job3 := 'accountant'

oracle bind variables one-to-one relationship, you'd need 1 defined each value intend include in in clause:

select job emp job in (:job1, :job2, :job3, ..., :job3000)

you need aware oracle in supports maximum of 1,000 values, or you'll get:

ora-01795: maximum number of expressions in list 1000

the best alternative create table (derived, temporary, actual, or view), , bring together values want. ie:

select a.job emp bring together (select :job1 col dual union select :job2 dual union select :job3 dual union ... union select :job3000 dual) b on b.col = a.job

sql oracle bind-variables

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -