salix/db/routines/vn/procedures/shelvingChange.sql

14 lines
393 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-11-14 08:59:01 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(
`vShelvingO` VARCHAR(10),
`vShelvingD` VARCHAR(10)
)
BEGIN
2024-11-14 08:59:01 +00:00
UPDATE itemShelving ish
JOIN shelving sh1 ON sh1.code = vShelvingD COLLATE utf8_unicode_ci
JOIN shelving sh2 ON sh2.code = vShelvingO COLLATE utf8_unicode_ci
SET ish.shelvingFk = sh1.id
WHERE ish.shelvingFk = sh2.id;
END$$
DELIMITER ;