Sorry, MySQL does not like the ( ). Try it without them :) Cheers /rudy
-----Original Message----- From: Colt Brunton [mailto:[EMAIL PROTECTED] Sent: vrijdag 18 juli 2003 15:38 To: [EMAIL PROTECTED] Subject: Query debugging Hi all I am trying to adapt a query, (kindly) given by Rudy and I can't seem to debug it. Here is the query: CREATE TABLE Contact (SELECT ContactNo, Work_Address, Field20, Work_City, Work_State, Work_Zip, Work_Country FROM import UNION ALL SELECT ContactNo, Home_Address, Field26, Home_City, Home_State, Home_Zip, Home_Country FROM import WHERE Home_Address IS NOT NULL); CREATE TABLE ADDRESS (SELECT Work_Address, Field20, Work_City, Work_State, Work_Zip, Work_Country FROM import UNION ALL SELECT Home_Address, Field26, Home_City, Home_State, Home_Zip, Home_Country FROM import WHERE Home_Address IS NOT NULL); The error messages given by the MySQL Front are: You have an error in your SQL syntax near 'SELECT ContactNo, Work_Address, Field20, Work_City, Work_State, Work_Zip, Work_C' at line 1 You have an error in your SQL syntax near 'SELECT Work_Address, Field20, Work_City, Work_State, Work_Zip, Work_Country FROM' at line 1 These messages aren't very informative, is there a more informative way to debug queries? Thanks again for the input. regards -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]