Hi,
The line below is used to feed a combobox. (It is from a database which is
used to log pupil behaviour!) The 'incidents' table contains a list of
students who have been involved in incidents. Some may appear several
times, hence the Distinct. However, thelist generated should still be
sorted by Surname. When I add Order by [Surname] I'm told it conflict with
the 'Distinct'. Surely it does not?
SELECT DISTINCT [Incidents].[StudentId], [Incidents].[Surname] & " " &
[Incidents].[Forename] FROM Incidents WHERE [Surname]>"";
Thanks in advance
John M
The line below is used to feed a combobox. (It is from a database which is
used to log pupil behaviour!) The 'incidents' table contains a list of
students who have been involved in incidents. Some may appear several
times, hence the Distinct. However, thelist generated should still be
sorted by Surname. When I add Order by [Surname] I'm told it conflict with
the 'Distinct'. Surely it does not?
SELECT DISTINCT [Incidents].[StudentId], [Incidents].[Surname] & " " &
[Incidents].[Forename] FROM Incidents WHERE [Surname]>"";
Thanks in advance
John M
Comment