The Brown Growler
Registered User.
- Local time
- Today, 04:23
- Joined
- May 24, 2008
- Messages
- 85
Hi,
I would be grateful for any help on how I can sequentially number some table records where there are multiple records with the same ID.
Using the table presented below as an example:
T_Customer_Matrix
[Customer ID], [Year], [Month]
WP-27, 2006, March
WP-27, 2006, April
WP-27, 2006, May
For [Customer ID], there may be up to 72 records each one with the same [Customer ID] but with different values for the [Year] column and different values for the [Month] column. What I hope to be able to do is to create a query that will allow add a new column to number the records per [Customer ID] sequentially with 1, 2, 3......... The records are currently sorted by [Customer ID], [Year], [Month] ascending.
Alternatively, if there is some type of update query that I can use directly on the table then I could create a new empty column in the table and populate this with whatever procedure will work.
Any help most appreciated.
Rgds
Growlos
I would be grateful for any help on how I can sequentially number some table records where there are multiple records with the same ID.
Using the table presented below as an example:
T_Customer_Matrix
[Customer ID], [Year], [Month]
WP-27, 2006, March
WP-27, 2006, April
WP-27, 2006, May
For [Customer ID], there may be up to 72 records each one with the same [Customer ID] but with different values for the [Year] column and different values for the [Month] column. What I hope to be able to do is to create a query that will allow add a new column to number the records per [Customer ID] sequentially with 1, 2, 3......... The records are currently sorted by [Customer ID], [Year], [Month] ascending.
Alternatively, if there is some type of update query that I can use directly on the table then I could create a new empty column in the table and populate this with whatever procedure will work.
Any help most appreciated.
Rgds
Growlos