0

I have an access query that accesses to mysql table through odbc connection but I'm getting this error.

ODBC: Falló la llamada. [MySQL][ODBC 5.1 Driver][mysqld-5.5.21] 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 'UNION (SELECT id FROM table2 )) UNION (SELECT id FRO' at line 1 (#1064)

I'm using this access query.

SELECT id FROM table1
UNION 
SELECT id FROM table2 
UNION 
SELECT id FROM table3

This query works in mysql and also if the tables are in access, but it doesn't work when I do the query in accesss through odbc to mysql tables.

Any idea what the problem is?

Joe
  • 7,749
  • 19
  • 60
  • 110
  • 1
    have you seen this? http://stackoverflow.com/questions/12804495/multiple-union-query-doesnt-work/15004004 – Brad Apr 10 '14 at 15:43
  • 1
    And more importantly this one http://bugs.mysql.com/bug.php?id=7684 doesn't look resolved to me. I need to make an account to see the Progress log though (and I'm not making one) – Brad Apr 10 '14 at 15:46
  • It doesn't look good. As a last option, I could do a passthrough query in access. Thanks you! – Joe Apr 10 '14 at 17:39

0 Answers0