salix/db/routines/vn/views/itemShelvingStockRemoved.sql

15 lines
437 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`itemShelvingStockRemoved`
AS SELECT `ish`.`id` AS `itemShelvingFk`,
`ish`.`itemFk` AS `itemFk`,
0 AS `removed`
FROM (
(
`vn`.`itemShelving` `ish`
LEFT JOIN `vn`.`itemShelvingSale` `iss` ON(`iss`.`itemShelvingFk` = `ish`.`id`)
)
LEFT JOIN `vn`.`itemShelvingPlacementSupply` `isps` ON(`isps`.`itemShelvingFk` = `ish`.`id`)
)
GROUP BY `ish`.`id`