I have an array of numbers in memory and I need to put them in a temp table so I can join against other tables. The list can be 5 or it can be 250000.
I can do one insert at a time, but I was wondering if there was any sql trick where I could insert 100 at a time with some insert into select…. kind of thing that I’m not thinking of.
The bulk uploader (in sybase) is not an option because there’s no java implementation for it, and shelling to bcp is not an option either.
Try JDBC batch insert. I never worked with Sybase but this works with MySql, Postgres and Oracle as well.
http://download.oracle.com/javase/1.3/docs/guide/jdbc/spec2/jdbc2.1.frame6.html