Hi all.  Can somebody explain to me why the following SELECT doesn't work?:

SELECT COUNT(DISTINCT(CONCAT(contact_firstname,' ',contact_lastname)
as contact_name)) as count FROM Contacts GROUP BY contact_ident ORDER
BY contact_name;

The error returned is:

ERROR 1064: You have an error in your SQL syntax near 'as
contact_name)) as count FROM Contacts GROUP BY contact_ident ORDER BY
contact' at line 1

The table has:

contact_ident
contact_firstname
contact_lastname
contact_title
contact_phone
contact_phone2
contact_phone3
contact_email
contact_address
contact_address2
contact_city
contact_state
contact_zip
contact_notes
contact_client_ident
contact_select

Thanks.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to