michael...

it was meant as an example, to convey what i want to do, which is do a
simltaneaous insert into multiple tables at the same time. the syntax
concerning the left join/elements to be inserted was not intended to be
syntacticly (sp?) correct!!!

and as i stated, searching through mysql docs/google didn't shed light on
this issue. could be because mysql doesn't permit this kind of interaction,
although it is permitted with the update...

does this make more sense to you now...

-regards....


-----Original Message-----
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 10:06 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: insert/select for multiple tables...



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]


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

Reply via email to