SQL error

simon4amiee

Registered User.
Local time
Today, 16:08
Joined
Jan 3, 2007
Messages
109
Hi guys, I was given this to use but its not working in Access and my SQL knowledge is just at the start of my journey im afraid.



SELECT systemno,

COUNT(DISTINCT postcode) AS Total

FROM dbo.InterData

WHERE disdate >='20150301' And disdate <='20150331'

GROUP BY systemno

HAVING (COUNT(DISTINCT postcode)) >1
 
You will need to format the dates correctly - in Access it needs a # around the date construct;
Where disdate >=#2015/03/01# And disdate <=#2015/03/31#
 

Users who are viewing this thread

Back
Top Bottom