Can you help me understand why the following doesn't produce a recordset with just one record per Name ID? And also show me how to change it so it does? Thanks.
[CODE=SQL]SELECT [MyTable].[Name ID], Max([MyTable].Code) AS MaxOfCode, [MyTable].[Active Date]
FROM [MyTable]
GROUP BY [MyTable].[Name ID], [MyTable].[Active Date];[/CODE]
I've researched this quite extensively and am just not "getting it". :-( Note: DISTINCT doesn't help. Here is a snippet of the resulting recordset. I expect there should only be 4 records shown, not 6.
[CODE=SQL]SELECT [MyTable].[Name ID], Max([MyTable].Code) AS MaxOfCode, [MyTable].[Active Date]
FROM [MyTable]
GROUP BY [MyTable].[Name ID], [MyTable].[Active Date];[/CODE]
I've researched this quite extensively and am just not "getting it". :-( Note: DISTINCT doesn't help. Here is a snippet of the resulting recordset. I expect there should only be 4 records shown, not 6.
Code:
Name ID MaxOfCode Active Date AMADNI01 CT-005 03/22/99 ANANJA01 CT-005 09/01/92 ANANJA01 CT-007 05/22/94 ANDRDJ01 CT-005 08/01/92 ANDRDJ01 CT-006 11/11/94 AQUIDE01 CT-005 05/03/93
Comment