Files
Implementation_ITSA/SQL/Update stock_location country.sql
AzureAD\SylvainDUVERNAY 79f6e6111f Commit
2026-04-23 09:21:55 +02:00

102 lines
6.4 KiB
SQL

-- Update stock_location.country based on port/city name identification
-- Skipped: root nodes (Customer, Supplier, Warehouse, Drop, Lost and Found),
-- generic entries (ANY PORT, To be defined, Transit, Input/Output/Storage Zone),
-- ambiguous entries (Limas - geography uncertain)
UPDATE stock_location SET country = 9 WHERE id = 1254; -- Adelaide -> Australia
UPDATE stock_location SET country = 9 WHERE id = 1260; -- Gladstone -> Australia
UPDATE stock_location SET country = 9 WHERE id = 1276; -- Port Hedland -> Australia
UPDATE stock_location SET country = 17 WHERE id = 1221; -- Antwerpen -> Belgium
UPDATE stock_location SET country = 24 WHERE id = 1278; -- Rio Grande -> Brazil
UPDATE stock_location SET country = 32 WHERE id = 1288; -- Vancouver -> Canada
UPDATE stock_location SET country = 35 WHERE id = 1257; -- Barquito -> Chile
UPDATE stock_location SET country = 35 WHERE id = 1272; -- Mejillones -> Chile
UPDATE stock_location SET country = 36 WHERE id = 1225; -- Fangcheng -> China
UPDATE stock_location SET country = 36 WHERE id = 1232; -- Laizhou -> China
UPDATE stock_location SET country = 36 WHERE id = 1234; -- Longkou -> China
UPDATE stock_location SET country = 36 WHERE id = 1237; -- Ningde -> China
UPDATE stock_location SET country = 36 WHERE id = 1242; -- Putian -> China
UPDATE stock_location SET country = 36 WHERE id = 1243; -- Qingdao -> China
UPDATE stock_location SET country = 36 WHERE id = 1244; -- Rizhao -> China
UPDATE stock_location SET country = 36 WHERE id = 1246; -- Rugao -> China
UPDATE stock_location SET country = 36 WHERE id = 1252; -- YIZHENG -> China
UPDATE stock_location SET country = 36 WHERE id = 1253; -- Zhangjiagang -> China
UPDATE stock_location SET country = 59 WHERE id = 1241; -- Pori (Supplier) -> Finland
UPDATE stock_location SET country = 59 WHERE id = 1286; -- Pori (Customer) -> Finland
UPDATE stock_location SET country = 60 WHERE id = 1119; -- STORAGE - ROUEN -> France
UPDATE stock_location SET country = 64 WHERE id = 1226; -- Hamburg -> Germany
UPDATE stock_location SET country = 65 WHERE id = 1282; -- Tema -> Ghana
UPDATE stock_location SET country = 76 WHERE id = 1259; -- Budge Budge -> India
UPDATE stock_location SET country = 76 WHERE id = 1227; -- Hazira -> India
UPDATE stock_location SET country = 76 WHERE id = 1266; -- Kakinada -> India
UPDATE stock_location SET country = 76 WHERE id = 1267; -- Kandla -> India
UPDATE stock_location SET country = 76 WHERE id = 1273; -- New Mangalore -> India
UPDATE stock_location SET country = 76 WHERE id = 1275; -- Paradip -> India
UPDATE stock_location SET country = 76 WHERE id = 1283; -- Tuticorin -> India
UPDATE stock_location SET country = 76 WHERE id = 1284; -- Visakhapatnam -> India
UPDATE stock_location SET country = 77 WHERE id = 1255; -- BAHODOPI-POSO -> Indonesia
UPDATE stock_location SET country = 77 WHERE id = 1262; -- Gresik -> Indonesia
UPDATE stock_location SET country = 77 WHERE id = 1269; -- LHOKSEUMAWE -> Indonesia
UPDATE stock_location SET country = 84 WHERE id = 1228; -- Hibi -> Japan
UPDATE stock_location SET country = 84 WHERE id = 1231; -- Japan -> Japan
UPDATE stock_location SET country = 84 WHERE id = 1235; -- Naoshima -> Japan
UPDATE stock_location SET country = 84 WHERE id = 1236; -- Niihama -> Japan
UPDATE stock_location SET country = 84 WHERE id = 1239; -- Onahama -> Japan
UPDATE stock_location SET country = 84 WHERE id = 1247; -- Saganoseki -> Japan
UPDATE stock_location SET country = 102 WHERE id = 1116; -- PORT KELANG FREE ZONE -> Malaysia
UPDATE stock_location SET country = 102 WHERE id = 1115; -- STORAGE - PORT KELANG -> Malaysia
UPDATE stock_location SET country = 102 WHERE id = 1268; -- Kemaman -> Malaysia
UPDATE stock_location SET country = 109 WHERE id = 1233; -- Lazaro Cardenas -> Mexico
UPDATE stock_location SET country = 115 WHERE id = 1265; -- Jorf Lasfar -> Morocco
UPDATE stock_location SET country = 128 WHERE id = 1238; -- Odda -> Norway
UPDATE stock_location SET country = 135 WHERE id = 1223; -- Callao -> Peru
UPDATE stock_location SET country = 135 WHERE id = 1230; -- Ilo -> Peru
UPDATE stock_location SET country = 136 WHERE id = 1264; -- Isabel -> Philippines
UPDATE stock_location SET country = 149 WHERE id = 1277; -- Ras Al Khair -> Saudi Arabia
UPDATE stock_location SET country = 160 WHERE id = 1224; -- Donghae -> South Korea
UPDATE stock_location SET country = 160 WHERE id = 1240; -- Onsan -> South Korea
UPDATE stock_location SET country = 160 WHERE id = 1250; -- Ulsan -> South Korea
UPDATE stock_location SET country = 160 WHERE id = 1251; -- Yeosu -> South Korea
UPDATE stock_location SET country = 162 WHERE id = 1229; -- Huelva -> Spain
UPDATE stock_location SET country = 166 WHERE id = 1245; -- Ronnskar -> Sweden
UPDATE stock_location SET country = 169 WHERE id = 1248; -- Taichung -> Taiwan
UPDATE stock_location SET country = 172 WHERE id = 1256; -- Bangkok -> Thailand
UPDATE stock_location SET country = 172 WHERE id = 1271; -- Map Ta Phut -> Thailand
UPDATE stock_location SET country = 172 WHERE id = 1279; -- Samut Prakan -> Thailand
UPDATE stock_location SET country = 177 WHERE id = 1222; -- Bandirma -> Turkey
UPDATE stock_location SET country = 184 WHERE id = 1258; -- Beaumont -> United States
UPDATE stock_location SET country = 184 WHERE id = 1274; -- New Orleans -> United States
UPDATE stock_location SET country = 184 WHERE id = 1280; -- San Juan -> United States (Puerto Rico)
UPDATE stock_location SET country = 184 WHERE id = 1281; -- Stockton -> United States
UPDATE stock_location SET country = 184 WHERE id = 1249; -- Tampa (Customer) -> United States
UPDATE stock_location SET country = 184 WHERE id = 1285; -- Tampa (Supplier) -> United States
UPDATE stock_location SET country = 189 WHERE id = 1261; -- Go Dau -> Vietnam
UPDATE stock_location SET country = 189 WHERE id = 1263; -- Hai Phong -> Vietnam