Results 1 to 3 of 3
May 3, 2004, 08:33 #1
- Join Date
- Aug 2003
- 0 Post(s)
- 0 Thread(s)
[Access] Select fields without grouping by them
Let's say I have a table with these fields:
ID, LAST_NAME, FIRST_NAME, PROGRAM_CODE, PGM_YEAR
And there's at least one entry per person for each year they served. I'm trying to list people who have more than one PGM_YEAR row listed, and I need to list all of those fields in the resulting query.
So here's what I tried:
SELECT * FROM ( SELECT LAST_NAME, FIRST_NAME, Count(PGM_YEAR) AS YearsServed FROM [Table] GROUP BY LAST_NAME, FIRST_NAME, PGM_YEAR) WHERE YearsServed > 1;
Last edited by tsigo; May 3, 2004 at 09:50.