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

25 lines
670 B
MySQL
Raw Normal View History

2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`itemShelvingList`
AS SELECT `ish`.`shelvingFk` AS `shelvingFk`,
`ish`.`visible` AS `visible`,
`ish`.`created` AS `created`,
`pk`.`code` AS `parking`,
`ish`.`itemFk` AS `itemFk`,
`i`.`longName` AS `longName`,
`i`.`size` AS `size`,
`i`.`subName` AS `subName`,
`sh`.`parked` AS `parked`,
`pk`.`sectorFk` AS `sectorFk`
FROM (
(
(
`vn`.`itemShelving` `ish`
JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
)
JOIN `vn`.`item` `i` ON(`i`.`id` = `ish`.`itemFk`)
)
LEFT JOIN `vn`.`parking` `pk` ON(`pk`.`id` = `sh`.`parkingFk`)
)
ORDER BY `ish`.`created`