bruce wrote:

hi...

trying to figure out how to structure an insert/select for a multiple table
situation...

sort of...
 insert table1, table2 (table1.item1, table1.item2, table2.item1,...)
 select
   a.q1, b.q2
 from a1
 left join a2
  on a2.t=a1.t
 where a2.r='4';

i can't seem to figure out the syntax for the multiple table insert...

searching through google/mysql hasn't shed any light on this..

thanks for any pointers/comments...

-bruce

That's because there is no multiple-table INSERT syntax. See the manual for correct INSERT syntax <http://dev.mysql.com/doc/mysql/en/INSERT.html>.


I can't tell from your example what you are trying to do. You only select 2 columns, but you seem to be trying to insert the result into at least 4 columns. Perhaps if you carefully described what you have and what you want, someone will be able to suggest a way to accomplish your goals.

Michael

P.S.  You don't need a LEFT JOIN in that example.  A simple JOIN would do.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to