Categories
MySql SqLite

SQLITE – update a column from another table

SQLITE – update a column from another table while concatenating a string

UPDATE table1
SET table1.businessOwner =  table1.prenom1UniteLegale || ' ' || table1.nomUniteLegale, 
BusinessNameDavid = table1.denominationUniteLegale ,
BusinessAddressDavid = table1.numeroVoieEtablissement || ' ' || table1.typeVoieEtablissement || ' ' || table1.libelleVoieEtablissement 
from table2 
WHERE table1.siren = table1.siren 

Leave a Reply