Hi Pablo,
GROUP BY is an aggregate SQL function and must include all fields found in
the SELECT clause.
SELECT Name, PackageSent
FROM location
WHERE NOT PackageSent IS NULL
GROUP BY PackageSent, Name;
> I'm performing the following query to an Access database in a page:
>
> <cfquery datasource="webtrack" name="pkg_recipients">
> SELECT Name, PackageSent
> FROM location
> WHERE NOT PackageSent IS NULL
> GROUP BY PackageSent;
> </cfquery>
>
> However, I get this error when executing it:
>
> -----
> Error Diagnostic Information
> ODBC Error Code = S1000 (General error)
>
> [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query
that
> does not include the specified expression 'Name' as part of an aggregate
> function.
>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.