Forum
Hier ist die aktuelle Doku zu DB2 zu finden:
<a href="http://publib.boulder.ibm.com/infocenter/db2luw/v8//index.jsp
„>http://publib.boulder.ibm.com/infocenter/db2luw/v8//index.jsp
Dort ist die Funktion ausführlich beschrieben:
"The IDENTITY_VAL_LOCAL function is a non-deterministic function that returns the most recently assigned value for an identity column, where the assignment occurred as a result of a single row INSERT statement using a VALUES clause. The function has no input parameters. …
The value returned by the function is the value assigned to the identity column of the table identified in the most recent single row INSERT statement."
Also, am einfachsten direkt nach dem Insert den vergebenen Wert abfragen und dann den nächsten Insert machen.
MfG
AxelP