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