Microsoft
Software
Hardware
Network
Question : Count Distinct
Hi Guys i am trying to count distinct id, i am using this SQL statement
SELECT TissueLocation.MaxOfLocati
on, Count(DISTINCT TissueLocation.PatientID) AS CountOfPatientID
FROM TissueLocation
GROUP BY TissueLocation.MaxOfLocati
on;
I having an error
Syntax error (missing operator )in query expression 'COUNT(DISTINCT TissueLocation.PatientID)'
in query expression
. (Error 3075)
The expression you typed is not valid for the reason indicated in the message. Make sure you have typed field names and punctuation correctly, and then try the operation again.
How can i fix this
Thanks
Answer : Count Distinct
Count(DISTINCT .... is not supported in Access SQL.
Maybe something like this:
SELECT Table1.F1, Count(Table1.F2) AS CountOfF2
FROM Table1
GROUP BY Table1.F1;
mx
Random Solutions
Problem Importing and Running Modules
MS Access AS400 Function Understanding
Subreport/ Subform not showing up in Main Report
How to lower commit charge in windows XP
Data table with offsheet input
MS Access Macro Auto Select Both Combo Box and Text Box at Same time in Same form
Uneccessary Programs/ addons ...things that take up internet bandwidth that can be removed.
Infinite loop when Range is only 1 cell
ranking records and determining percentage of total in access 2007
Unable to RDP into Windows 2003 SBS after reboot