Ако това е SELECT
това работи:
select despgoods.`case number`
, despgoods.weight
, despgoods.customer
, customers.transporttypename
from despgoods
inner join customers
on despgoods.customer = customers.customer
След това опитайте това (забележете, че няма VALUES
клауза, ако искате да вмъкнете набора от резултати от SELECT
:
insert into despgoods_alldetails
(`case number`, weight, customer, transporttypename)
select despgoods.`case number`
, despgoods.weight
, despgoods.customer
, customers.transporttypename
from despgoods
inner join customers
on despgoods.customer = customers.customer