Hi,
I am using db2 ese v8.1.4a on win2k platform.
I am in the middle of an upgrade (data migration) from one version to another (typical product development scenario...) now the issue is, that original table data is restored but i need to reset the sequence on that table.
For: eg: I have TableA with some data now the requirement was to migrate table data and reset sequences to start with the value max(id) found in TableA. Likewise, there will be many such tables waiting to be migrated in similar fashion.
Now my question is, how do we reset the sequence number so that the application start creating new records starting from TableA.max(id) + 1...? Please note that this has to be done dynamically i.e i get max(id) from one table and need to increment it by one and then alter the existing sequence to that incremented value...
Any help is appreciated.
Thanks.