This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I am using jconn2.jar(5.5) jdbc driver for Sybase to connect
to a sybase database from a standalone java application.
My jave application will read thousands of
records from a text file and insert in to the table in the
I have a select query with IN clause.This IN clause will have more than 10,000 values. while executing this query, the
application is returning the below error:
Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Too many
parameters -- symbol table overflow.
... 10 more
The same query is working well for values in IN clause with
up to 10,000 values.
I tried with jconnect6 and jconnect7. but same result.
Anyone is having any idea, why it's
returning the error like above for the values having more
A query with 10,000 values in an IN clause sounds dubious to me. That looks like you get the results of one query and put them in an IN clause of another query. Unless you have a handicapped SQL server you should then use a nested query instead.
I remember from my time working with Sybase (direct queries, not with Java), that you can use not more than X values with IN. I don't remember what X was, though, but I think, it was less than 10.000. We had some strange effects in our queries and found this out by experimenting.