Actually, Sybase will accept the query. It allows group by on fields that are not in the select.

On Jul 12, 2007, at 2:55 AM, Q wrote:

This query is invalid, your database should reject it.

It should be:

SELECT departmentId FROM foo WHERE lastName='Smith' AND firstName='Bob' GROUP BY departmentId

which is the same as writing:

SELECT DISTINCT departmentId FROM foo WHERE lastName='Smith' AND firstName='Bob'

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to