liammoohan
Board Regular
- Joined
- Jan 11, 2008
- Messages
- 72
I am using the below VBA code in an attempt to replicate Row_Number() which can be done in SQL
This is the query I have written:
SELECT A.*, (SELECT COUNT(*) FROM tblRowNosTest WHERE A.PhoneNumber = PhoneNumber And A.ListName = ListName) AS RowNos
FROM tblRowNosTest as A
ORDER BY PhoneNumber, ListName, ContactAttempts
This is how the results are then displayed:
Column 'D' is displaying as an overall count; what I am trying to get to is that I want it to show as below (see column 'E'):
Any help would be greatly appreciated in being able to get the query to output the results to look like the values in column 'E' as oppose to what it is actually outputting in column 'D' highlighted yellow.
Thanks
This is the query I have written:
SELECT A.*, (SELECT COUNT(*) FROM tblRowNosTest WHERE A.PhoneNumber = PhoneNumber And A.ListName = ListName) AS RowNos
FROM tblRowNosTest as A
ORDER BY PhoneNumber, ListName, ContactAttempts
This is how the results are then displayed:
Column 'D' is displaying as an overall count; what I am trying to get to is that I want it to show as below (see column 'E'):
Any help would be greatly appreciated in being able to get the query to output the results to look like the values in column 'E' as oppose to what it is actually outputting in column 'D' highlighted yellow.
Thanks