help with access query add numerator column

E_Gold

Registered User.
Local time
Today, 17:45
Joined
Sep 18, 2010
Messages
26
hi

i have table MEN with field name and ID (not unic) like this:

MEN
===
AA | 1010
BB | 2020
CC | 3030
DD | 4040

how to run any query that can add column that has numerator ? like this:

MEN
===
AA | 1010 | 1
BB | 2020 | 2
CC | 3030 | 3
DD | 4040 | 4
 
You said the IDs are not unique, so they can repeat? If they do what will the sequence be?
 
You said the IDs are not unique, so they can repeat? If they do what will the sequence be?


is there any solution for this ? i only need to add column that contain numbers
from 1 - to the end of the table
 
Well, that doesn't answer my question. What if you have this:

MEN
===
AA | 1010 | 1
BB | 2020 | 2
CC | 3030 | 3
CC | 4040 | 4 or 3?
DD | 5050 | 4

What's that red part going to be? Or it doesn't matter, it should just carry on with the numbering?

Also, how are you sorting?

You will be able to do this quicker on a report.
 
Well, that doesn't answer my question. What if you have this:

MEN
===
AA | 1010 | 1
BB | 2020 | 2
CC | 3030 | 3
CC | 4040 | 4 or 3?
DD | 5050 | 4

What's that red part going to be? Or it doesn't matter, it should just carry on with the numbering?

Also, how are you sorting?

You will be able to do this quicker on a report.

it will be like this
MEN
===
AA | 1010 | 1
BB | 2020 | 2
CC | 3030 | 3
CC | 4040 | 4
DD | 5050 | 5
 
And as I previously asked, how are you sorting? Is the second field sorted in ascending order?
 
Alright. Put this in your query as a new column:
Code:
RowID: (SELECT Count(*) FROM [COLOR=Red]TableName [/COLOR]As T  WHERE T.[COLOR=Red]Field1[/COLOR] <= [COLOR=Red]TableName[/COLOR].[COLOR=Red]Field1[/COLOR])
Amend only the red bits.
 

Users who are viewing this thread

Back
Top Bottom