Question

2
Replies
342
Views
Close popover
Michael Blust (MichaelB9860)
Segue Technologies Inc
Pega Certified System Architect
Segue Technologies Inc
US
MichaelB9860 Member since 2018 8 posts
Segue Technologies Inc
Posted: September 30, 2019
Last activity: September 30, 2019
Closed
Solved

Create Unique IDs in a given table

We have a concrete Pega table which we would like to generate unique values (for insert). Currently we have imported the records from an excel spreadsheet; however, if we are to allow the customer to add records themselves, we will need to generated new unique keys/ids.

For example, we have an organization table; which has ORG_ID as the primary key. If we want the user to add a new Organization, how do we generate the new key? Ideally, we would like to make a call to get the next sequence (specific to the Organization table). If the last record in the Organization table has an ORG_ID of 1100, then we want the next record generated to be 1101 (and so on).

I realize that we can query the entire Organziation table for the max(ORG_ID); however, that seems very inefficient. Is there an easier way to generate the new unique sequence ID?

Data Integration Java and Activities
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.