Happiness, that gave me what I was looking for. Thank you Johan.
I have tested the option you gave me but my brackets was in the wrong place.
On 08/11/2013 13:23, Johan De Meersman wrote:
----- Original Message -----
From: "Machiel Richards" <machiel.richa...@gmail.com>
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'GROUP BY t.AccountID,
I suspect your query has never been doing what you think at all, and you need to
select [fields] from (
select fields1 blahblah
UNION
select fields2 blahblah) unionized
group by blurb
that is, wrap the entire union in a virtual table and do the group by on that.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql