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
Need to restore a single mailbox from ntbackup
Visual FoxPro 9 formset question
SBS 03 to 08 migration. Can I change servername and domainname?
Windows 2003 AD with a Sync Issue
Why is this so hard? Form2.show() Form1.hide() Does .Net not support this?
Export DataView to Excel Spreadsheet with C#
How can I transfer Adobe CS2 license to another system?
How do I convert a stored procedure to be used for batch processing?
Can you install Vista / windows 7 to winnt directory
Multiple IIF statement error