For some reason,
java chokes when NOT IN is used in a db query.
I took the query down to a very simplified query to
test this.
Initially I had something like this:
select x1, x2 from tableX where x1 NOT IN (select Y1 from table Y);
To try to determine what would work I played with code, and took it down to something very simple to see if a simple NOT IN would work.
So I tried this:
select x1, x2 from tableX where x1 not in ('value1', 'value2')
I got the same invalid column name error.
This does NOT give an error
select x1, x2 from tableX where x1 IN ('value1', 'value2')
This DOES give an invalid column name error
select x1, x2 from tableX where x1 NOT IN ('value1', 'value2')
All of the queries work fine when given to sql plus directly.
Can any one get a query to work, passed as an Oracle Statement, to java, with a NOT IN in the query?
Is there an alternate syntax I can use in Java for a NOT IN query?
I really do not want to go through each record 1x1, as I have been doing.
I am trying to speed up what I had previously coded.
Thank you