PDA

View Full Version : Identity Fields



marc_swingler
04-07-2006, 08:04 AM
Using JDBC, if I need the auto-generated keys for an insert statement, I'll just call statement.getGeneratedKeys(). Using MS SQL Server I'd try SELECT @@IDENTITY FROM <tablename> after each insert. How do I get and associate all generated keys with their corresponding inserted rows in Spoon?

MattCasters
04-08-2006, 06:59 AM
Hi Mark,

We didn&#39;t really need this so far, but I guess it&#39;s not that hard to add support for this.
Can you add a tracker? We&#39;ll try to squeeze it into the 2.3.0 release for next month.

Thanks,
Matt

marc_swingler
04-11-2006, 12:48 PM
I just saw the change. I&#39;ll test it out sometime tonight.

Marc

MattCasters
04-11-2006, 10:23 PM
Marc,

It&#39;s only doing ONE key in a table (most database only support 1 by the way) at the moment, but we could extend this easily in the future.

Also, it doesn&#39;t do this with batch processing turned on. There is a way to do it, but it&#39;s pretty complex stuff to make that happen. At the moment I don&#39;t want to break anything as we&#39;re doing development at 1104 commits over the last 30 days. :-)

Matt