DELIMITER $$ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getInfo`(vItemFk VARCHAR(22)) BEGIN /** * Muestra informaciĆ³n realtiva a la ubicaciĆ³n de un item * * @param vItemFk Id del item */ SELECT vn.barcodeToItem(vItemFk) INTO vItemFk; SELECT pk.code Parking, sh.code Matricula, ish.visible visible, ish.created created, ish.itemFk itemFk, sh.priority FROM vn.itemShelving ish JOIN vn.shelving sh ON sh.id = ish.shelvingFk JOIN vn.parking pk ON pk.id = sh.parkingFk WHERE ish.itemFk = vItemFk ORDER BY sh.priority DESC, created ASC; END$$ DELIMITER ;