|
>not sure if identity_val_local( ) will return the most >recent identity system wide for the table or just your job. Not only is it for just your job, but it's also at the same level as the request. If you insert a row into a table that has an identity, and a trigger on that table inserts a row into another table that also has an identity, and that table inserts... Etc. IDENTITY_VAL_LOCAL() returns the "correct" value at each level. "Correct" means if your RPG program inserts into TableA and then your RPG program asks for IDENTITY_VAL_LOCAL() it will get the value from TableA. If a trigger on TableA inserts into TableB and the trigger asks for IDENTITY_VAL_LOCAL() it will get the value from TableB, etc. -Walden ------------ Walden H Leverich III Tech Software (516) 627-3800 x3051 WaldenL@xxxxxxxxxxxxxxx http://www.TechSoftInc.com Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.