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

18 lines
438 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionScan_List`(vPalletFk INT)
BEGIN
SELECT es.id,
t.routeFk Ruta,
t.id Ticket,
e.counter Caja,
es.expeditionFk
FROM vn.expeditionScan es
JOIN vn.expedition e ON e.id = es.expeditionFk
JOIN vn.ticket t ON t.id = e.ticketFk
WHERE es.palletFk = vPalletFk
ORDER BY Ruta, Ticket, Caja;
END$$
DELIMITER ;