Om detta är SELECT
som fungerar:
select despgoods.`case number`
, despgoods.weight
, despgoods.customer
, customers.transporttypename
from despgoods
inner join customers
on despgoods.customer = customers.customer
Prova sedan detta (märke att det inte finns några VALUES
). om du vill infoga resultatuppsättningen av en 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