----- Original Message -----
From: "Philippe L. Houze" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 8:09 AM
Subject: MySQL: Multiple INSERTS syntax ...
> When running: INSERT INTO customers3 (firstname) select TRIM(trailing
> char(10) FROM firstname) FROM customers where id>1219; everything works
> according to plan but when running: INSERT INTO customers3
> (lastname,firstname) SELECT trim(trailing char(10) FROM firstname FROM
> customers where id>1219, trim(trailing char(10) FROM lastname FROM
customers
> where id>1219; I am getting an 1064 error
Your bracketing is a bit wonky, and you can only have one FROM matching each
SELECT.
Something like:
INSERT INTO customers3 (lastname, firstname)
SELECT trim(trailing char(10) FROM firstname), trim(trailing char(10) FROM
lastname)
FROM customers WHERE id > 1219;
--
Allen Grace
Dark Blue Sea Pty Ltd
ph +61 7 3007 0000
fax +61 7 3007 0001
***The opinions expressed in this email are my own and are not
representative of DBS Pty Ltd.***
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php