Solved Add Index Field?

Space Cowboy

Member
Local time
Today, 08:31
Joined
May 19, 2024
Messages
245
Good Afternoon Good People,

I have converted a query to a table.
I need to add a unique ID to each row
Is there a simple way to add an auto number index field, I thought that it may ask me on creation but it did not.
 
Queries don't have independent indexes. Tell us what you are really aiming for as the final product. June7's suggestion, for example, would work if the table in the query actually includes an AutoNumber in it.
 
I currently have the following Table

PrtIDodateOrderID

Several different parts can be on an order. For other calculations I need a unique ID for each row. The first column needs to be supplemented to the above table to produce the below table. I would like it to auto number the entire table.

IndexIDPrtIDodateOrderID
 
What didn't work with the implementation of June7's suggestion?
 
See my previous (edited) reply.

ALTER TABLE tablename ADD COLUMN IndexID COUNTER, CONSTRAINT PRIMARYKEY PRIMARY KEY (IndexID);

Field will be added at the end of fields in table design.
 
I have added a new field as instructed and set data type as auto number.

Get this

CaptureA.PNG
 
Need to increase that setting I believe?
 
I have reduced the rows to half a million and auto number has worked. Thanks June7

I will just push until I find the max.

Thank you all!
 
I had a CSV file of 2.6 million postcode records and over 50 fields which I imported into Access and added an autonumber PK field.
 
I have reduced the rows to half a million and auto number has worked. Thanks June7
So, with something that large, the best solution is to define the table with an autonumber column as the PK and then run an append query. You shouldn't have any trouble generating an autonumber this way.
 
So, with something that large, the best solution is to define the table with an autonumber column as the PK and then run an append query. You shouldn't have any trouble generating an autonumber this way.
It was slightly complicated in my case as that single table occupied almost 1.6 GB! Thankfully the data was read only
 

Users who are viewing this thread

Back
Top Bottom