> I want this statement to count how many people are in the class
> by the date.
> Please help me it keeps on kicking out this error.
>
> Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
> operator) in
> query expression 'count(distinct cccustomer.clname)'.
>
> <cfquery name="qryGETSTUDENTS" datasource="conceal" dbtype="ODBC">
> SELECT      classdate.id, cccustomer.dateid, count(distinct
> cccustomer.clname) as sum_custname
> FROM        cccustomer, classdate
> WHERE       classdate.id = cccustomer.dateid</cfquery>

Count is an aggrigate function, and you're not aggrigating any of the other
fields

Try grouping the other fields

BTW, a little cheat I used to use when we used Access, build your queries in
the Query builder - that way you can get it to make the odd SQL instead of
you hassling with problems like this

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to