| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Rudy Metzger | Date: | July 18 2003 2:18pm |
| Subject: | RE: Query debugging | ||
| View as plain text | |||
Sorry, MySQL does not like the ( ). Try it without them :)
Cheers
/rudy
-----Original Message-----
From: Colt Brunton [mailto:cbrunton@stripped]
Sent: vrijdag 18 juli 2003 15:38
To: mysql@stripped
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
| Thread | ||
|---|---|---|
| • Query debugging | Colt Brunton | 18 Jul |
| • Re: Query debugging | Victoria Reznichenko | 18 Jul |
| • RE: Query debugging | Rudy Metzger | 18 Jul |
| • RE: Query debugging | Colt Brunton | 18 Jul |
