salix/db/versions/.archive/10744-aquaBirch/00-firstScript.sql

9 lines
233 B
MySQL
Raw Permalink Normal View History

UPDATE vn.shelving
SET isPrinted = TRUE
WHERE LEFT (code, 2) IN (
SELECT DISTINCT LEFT(code,2)
FROM vn.shelving
WHERE isPrinted
AND code REGEXP '^[A-Za-z]{2}[0-9]'
ORDER BY code)
AND code REGEXP '^[A-Za-z]{2}[0-9]'