L
Leslie Isaacs
Hello All
I have a table [x confirmed], and 2 of the fields are 'practice' and 'month
name'. This table contains typically between 10 and 50 records for each
combination of 'practice' and 'month name' values - so for e.g. there may be
22 records where 'practice' = "The Health Centre" and 'month name' = "May
2008". I need a query that will return the total number of UNIQUE values of
'practice' for a given value of 'month name' - i.e. I need to know how many
different 'practice' values there are where 'month name' = "March 2008".
I have tried this:
SELECT DISTINCT [x confirmed].practice
FROM [x confirmed]
WHERE ((([x confirmed].[month name])="March 2008"))
GROUP BY [x confirmed].practice;
.... but this returns the total number of records where 'month name' = "March
2008". Adding the word "DISTINCT" seems to have made no difference to the
result returned by the query.
What have I done wrong?
Hope somone can help.
Many thanks
Les
I have a table [x confirmed], and 2 of the fields are 'practice' and 'month
name'. This table contains typically between 10 and 50 records for each
combination of 'practice' and 'month name' values - so for e.g. there may be
22 records where 'practice' = "The Health Centre" and 'month name' = "May
2008". I need a query that will return the total number of UNIQUE values of
'practice' for a given value of 'month name' - i.e. I need to know how many
different 'practice' values there are where 'month name' = "March 2008".
I have tried this:
SELECT DISTINCT [x confirmed].practice
FROM [x confirmed]
WHERE ((([x confirmed].[month name])="March 2008"))
GROUP BY [x confirmed].practice;
.... but this returns the total number of records where 'month name' = "March
2008". Adding the word "DISTINCT" seems to have made no difference to the
result returned by the query.
What have I done wrong?
Hope somone can help.
Many thanks
Les