Problem with "INSERT ... SELECT"

Problem with "INSERT ... SELECT"

am 12.04.2005 05:00:06 von Billy Yard

------=_NextPart_000_001A_01C53EF2.959784B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

According to the online manual, the syntax is:
INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name [(col_name,...)]
SELECT ...
[ ON DUPLICATE KEY UPDATE col_name=3Dexpr, ... ]
This syntax shows that multiple fields are allowed however when I try to =
execute the statement:insert master1backup (code, track, title, artist =
)select (code, track, title, artist ) from mainmasterI get the error =
"Operand should contain 1 column(s)". Why am I getting this error?
------=_NextPart_000_001A_01C53EF2.959784B0--

RE: Problem with "INSERT ... SELECT"

am 12.04.2005 11:33:13 von hmv

Your statement contains 'select (code, track, title, artist )'. The
parenthesis shouldn't be there. For some reason, the server seems to be
expecting a function named 'select'.


Helder M. Vieira



----- Original Message -----
(...)
This syntax shows that multiple fields are allowed however when I try to
execute the statement:insert master1backup (code, track, title,
artist )select (code, track, title, artist ) from mainmasterI get the error
"Operand should contain 1 column(s)". Why am I getting this error?


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org