RichardMGreen
Well-known Member
- Joined
- Feb 20, 2006
- Messages
- 2,177
Hi all
I want to check for duplicate IDs in a table but I need to do it in a specific way.
Each ID has a date attached to it (but in a different column).
I need to check the IDs for this month against all the IDs in the table and just count the duplicates.
E.g. ID C5432 appears in May and February so I want to return a 1 for that (so I can sum them later). ID C6785 only appears in May so it's ignored.
I then need to do the same for year to date as well (which is presumably the same idea just on a bigger scale?).
Anyone any ideas on where to start with this? I can pull the relevant IDs for month and year but I'm not sure how to check them.
I want to check for duplicate IDs in a table but I need to do it in a specific way.
Each ID has a date attached to it (but in a different column).
I need to check the IDs for this month against all the IDs in the table and just count the duplicates.
E.g. ID C5432 appears in May and February so I want to return a 1 for that (so I can sum them later). ID C6785 only appears in May so it's ignored.
I then need to do the same for year to date as well (which is presumably the same idea just on a bigger scale?).
Anyone any ideas on where to start with this? I can pull the relevant IDs for month and year but I'm not sure how to check them.
Last edited: