I'm working with iSeries V5. I have a table that I have to insert rows selected from another table. But I also...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
have to put row numbers for each inserted row, because more than one user has to use this application. Can you advise me on how to accomplish this?
There's a new ROWID data type in V5R2 that can be used to have DB2 generate a 40-byte unique identifier for each new row in a table. You might also consider writing a Before Insert trigger that "intercepts" the insert request and computes a unique identifier for that row.
MORE INFORMATION ON THIS TOPIC
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.
Related Q&A from Kent Milligan
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ...continue reading
Create a host variable of the where in statement on the fly with dynamic SQL.continue reading
To monitor members stuck within a physical file on AS/400, you can periodically use the display file description (DSPFD) command to create an output ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.