This commit is contained in:
parent
df77ec5552
commit
80fc3235e9
|
@ -8,14 +8,16 @@ ALTER TABLE vn.supplier
|
|||
-- client
|
||||
UPDATE vn.client c
|
||||
JOIN country c2 ON c2.id = c.countryFk
|
||||
SET c.viesCode = c2.code;
|
||||
SET c.viesCode = c2.code
|
||||
WHERE c.isVies;
|
||||
|
||||
UPDATE client c
|
||||
JOIN country c2 ON c2.id = c.countryFk
|
||||
JOIN country c2 ON c2.id = c.countryFk
|
||||
SET c.viesCode = 'FR'
|
||||
WHERE c2.name = 'Mónaco';
|
||||
WHERE c2.name = 'Mónaco' AND c.isVies;
|
||||
|
||||
-- supplier
|
||||
UPDATE supplier s
|
||||
JOIN country c ON c.id = s.countryFk
|
||||
SET s.viesCode = c.code;
|
||||
JOIN country c ON c.id = s.countryFk
|
||||
SET s.viesCode = c.code
|
||||
WHERE s.isVies;
|
||||
|
|
Loading…
Reference in New Issue