Page 1 of 1

Automatic Min Value for Sequential Data Generator

Posted: Mon 09 Dec 2019 19:54
by corneliusd
I'm using dbForge Data Generator for Oracle and want to add customers to an existing customer table. The Customer_ID field is an Integer with a "unique" constraint but it is not an auto-inc field. When I use the Data Generator to add customers, I am using the ID (Sequential) generator but have to manually set the Min value to one more than the last ID currently in the customer table.

What I would like to do is have the script automatically figure out what the min value should be by starting off with Max(Customer_ID) + 1.

Is there a way to do this?

Thanks,
David.

Re: Automatic Min Value for Sequential Data Generator

Posted: Tue 10 Dec 2019 14:35
by alexa
You could unselect 'Truncate' in the table properties.

Re: Automatic Min Value for Sequential Data Generator

Posted: Tue 10 Dec 2019 16:43
by corneliusd
That's not the issue. Of course, I'm not truncating the data first because then I wouldn't be adding customers but simply replacing my entire test set--not what I want to do.

The issue is that if I don't manually set the minimum value for Customer_ID to 1 greater than the current maximum Customer_ID, then the script generates duplicate Customer_ID values--the constraints are disabled during generation.

Since I want to run this every few days or weeks as I need more test customers, I'm looking for a way to automatically set the last Customer_ID to a valid minimum.

Thanks,
David.

Re: Automatic Min Value for Sequential Data Generator

Posted: Wed 11 Dec 2019 15:59
by alexa
Thank you for the reply.

There is no such a possibility.

Though, you can add a suggestion on the UserVoice forum where other users can vote for it https://devart.uservoice.com/forums/132897-dbforge-studio-for-oracle

We collect and analyze the information from this forum in order to make a proper roadmap for the future product releases.