>You did not show us your actual insert statement, but ....
>You can not insert into a table listed anywhere in the select.


sorry,man. i should have been given you the whole thing:

here it comes:

db one with table person
(firstname,name,email,phone,fax,hashval,flag,etc...) and table hashvalue
(id,value)
db two with table book (name,email,phone) (only three fields!)

what SHOULD be done is this:

use one;
insert into two.book
select concat(firstname, ' ', name),email,phone
from person
left join hashvalue
on person.hashval=hashvalue.id
where person.flag='somevalue' or person.flag='someothervalue';

now i try to do the select only and the insert in a loop,since the
result does only have about 150 entries...

but you got an idea about that statement?

best regards

        udo


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

Reply via email to