Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Seed an AutoIncrement Number

Status
Not open for further replies.

dobe1

Technical User
Jun 28, 2004
65
0
0
US
I have a table with 16,000 pre-existing records. I wish to simply go into the design view, add a field auto increment, and seed the starting point at 500,000. How can I do this?

Thanks in advance,

Dobe
 
SQL code:
ALTER TABLE myTable ADD COLUMN myID COUNTER(500000,1);

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Just out of curiosity, Dobe, why did you need to do this?

Thanks for indulging...
Leslie
 
These are customers from a possible acquistion. Our enterprise system has a self generating field, which assigns customer numbers. Therefore, I need to take the highest possible value, and self generate from there.

I suppose a better way would have been to simple populate the field with record number + 500,000. What SQL code do I use in Access for this method?

Thanks,

Dobe
 
There is no record number in a relational database.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,
I am afraid this resulted in the seed being 1, and from there the last record was N+1, where N = record number. The 500000 did not act as a see.
 
PHV,
I had hoped from my description of the above, that I was using a simple flat file in order to populate these values outside of our enterprise system.

Again,
The flat file resides within MS Access. The values well be inserted into our enterprise system.

Dobe
 
Unfortunately, I cannot see where I can edit this post. The last post should have read " I had hoped from my descripton of the above that it were obvious I was using a flat file.....yada yada yada
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top