0

I have a problem whith my query sql in OracleDataAdpater with my API.

Working in my API: select * from table where colum = :value

Not Working error ORA-01008: not all variables bound:

select * from table where colum = &value

I need because my final query should be with IN becasuse =: is not working to list values

select * from table where colum IN( &value)

Final query: select * from table where colum IN('001','002','003');

Thanks

7
  • Please share a minimal reproducible example. Commented Jul 7, 2021 at 11:00
  • You can't pass an array as a single value. IN works with individual values, not an array of values. Oracle parameter names start with :, not &`. Changing that prefix won't change the parameter type Commented Jul 7, 2021 at 11:07
  • SQL, the language, doesn't allow using IN with a data source like a table or array. That expression is specifically used to specify that a field is equal to one of the supplied values. Reading data from a set is done using FROM and SELECT Commented Jul 7, 2021 at 11:12
  • Thanks: Them I have to do something like: select * from table where colum IN(:value1, :value2, value3); How can I assing the differents values to the same variable? Commented Jul 7, 2021 at 11:15
  • Panagiotis comments that cant't I use IN, then in SQL only can use OR? like that select * from where colum =: value1 or colum =: value2 or colum =: value1 Commented Jul 7, 2021 at 11:31

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.