8144-devToTest_2448 #3216

Merged
alexm merged 256 commits from 8144-devToTest_2448 into test 2024-11-19 07:36:04 +00:00
6 changed files with 6 additions and 0 deletions
Showing only changes of commit cdcc5051d2 - Show all commits

View File

@ -15,6 +15,7 @@ BEGIN
FROM address a
JOIN town t ON t.provinceFk = a.provinceFk
JOIN postCode p ON p.townFk = t.id
JOIN zoneGeo zg ON zg.id = p.geoFk
WHERE a.id = vSelf
ORDER BY (a.city SOUNDS LIKE t.name) DESC,
(p.code = a.postalCode) DESC

View File

@ -15,6 +15,7 @@ BEGIN
FROM client c
JOIN town t ON t.provinceFk = c.provinceFk
JOIN postCode p ON p.townFk = t.id
JOIN zoneGeo zg ON zg.id = p.geoFk
WHERE c.id = vSelf
ORDER BY (c.city SOUNDS LIKE t.name) DESC,
(p.code = c.postcode) DESC

View File

@ -16,6 +16,7 @@ BEGIN
JOIN town t ON t.provinceFk = s.provinceFk
JOIN postCode p ON p.townFk = t.id
LEFT JOIN supplierAddress sad ON sad.supplierFk = s.id
JOIN zoneGeo zg ON zg.id = p.geoFk
WHERE s.id = vSelf
ORDER BY (s.city SOUNDS LIKE t.name) DESC,
(p.code = s.postCode) DESC,

View File

@ -10,6 +10,7 @@ CREATE OR REPLACE TEMPORARY TABLE tmp.tAddressGeo
FROM vn.address a
JOIN vn.town t ON t.provinceFk = a.provinceFk
JOIN vn.postCode p ON p.townFk = t.id
JOIN vn.zoneGeo zg ON zg.id = p.geoFk
GROUP BY a.id
ORDER BY (a.city SOUNDS LIKE t.`name`) DESC,
(p.code = a.postalCode) DESC;

View File

@ -13,6 +13,7 @@ CREATE OR REPLACE TEMPORARY TABLE tmp.tClientGeo
FROM vn.client c
JOIN vn.town t ON t.provinceFk = c.provinceFk
JOIN vn.postCode p ON p.townFk = t.id
JOIN vn.zoneGeo zg ON zg.id = p.geoFk
GROUP BY c.id
ORDER BY (c.city SOUNDS LIKE t.`name`) DESC,
(p.code = c.postcode) DESC;

View File

@ -13,6 +13,7 @@ CREATE OR REPLACE TEMPORARY TABLE tmp.tSupplierGeo
JOIN vn.town t ON t.provinceFk = s.provinceFk
JOIN vn.postCode p ON p.townFk = t.id
LEFT JOIN vn.supplierAddress sad ON sad.supplierFk = s.id
JOIN vn.zoneGeo zg ON zg.id = p.geoFk
GROUP BY s.id
ORDER BY (s.city SOUNDS LIKE t.`name`) DESC,
(p.code = s.postCode) DESC,