SOLVED!
Ok, got it working. The problem was that I had the ODBC setting AUTOCOMMIT set to 'on' (the default) so that is why I was getting NULL values.
I did try the VALUE command without error but got NULL values also, so I stuck with the select statement since I wasn't that familiar with the...
Thanks for the replies.
First of all, my tables are defined with key fields defined with BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE). I will not be explicitly changing the indentity fields and want DB2 to generate values for me. That part I got.
My problem is...
Maybe a little more clarification is needed. I need to save a record in a parent table and records in the child table. I need to retrieve the value of the auto generated key of the newly inserted parent record in order to perform inserts on the child table.
What are some techniques in DB2 to...
Greetings,
I am new to DB2 and am migrating an app from Oracle to DB2 UDB Workgroup 7.1. I am planning on using the GENERATED ALWAYS AS IDENTITY clause for my primary key field in each of my tables. (the Oracle app uses sequences)
My question is, after I perform an INSERT on a table, what is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.