update structure DB

This commit is contained in:
Bernat 2018-06-07 07:11:43 +02:00
parent 8c34dba79e
commit 905122c864
1 changed files with 2 additions and 10 deletions

View File

@ -1,8 +1,3 @@
USE `vn`;
DROP procedure IF EXISTS `itemLastEntries`;
DELIMITER $$
USE `vn`$$
CREATE DEFINER=`root`@`%` PROCEDURE `itemLastEntries`(vItem INT, vDays DATE)
BEGIN
SELECT
@ -31,9 +26,6 @@ FROM itemType it
LEFT JOIN origin o ON o.id = i.originFk
) ON it.id = i.typeFk
LEFT JOIN edi.ekt ek ON b.ektFk = ek.id
WHERE b.itemFk = vItem And tr.shipped > vDays
WHERE b.itemFk = vItem And tr.shipped BETWEEN vDays AND CURDATE()
ORDER BY tr.landed DESC , b.id DESC;
END$$
DELIMITER ;
END