salix/db/changes/231601/00-updateisViesClient.sql

5 lines
239 B
MySQL
Raw Normal View History

2023-04-21 07:14:30 +00:00
UPDATE IGNORE vn.client c
JOIN vn.country co ON co.id = c.countryFk
SET c.fi = MID(REPLACE(c.fi, ' ', ''), 3, LENGTH(REPLACE(c.fi, ' ', '')) - 1)
WHERE c.isVies = TRUE
AND co.code = LEFT(REPLACE(c.fi, ' ', ''), 2);