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

20 lines
563 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`expeditionScan_Monitor`
AS SELECT `rs`.`id` AS `truckFk`,
`rs`.`eta` AS `ETD`,
`rs`.`description` AS `description`,
`ep`.`id` AS `palletFk`,
`ep`.`position` AS `position`,
`ep`.`built` AS `built`,
`es`.`id` AS `scanFk`,
`es`.`expeditionFk` AS `expeditionFk`,
`es`.`scanned` AS `scanned`
FROM (
(
`vn`.`roadmapStop` `et`
LEFT JOIN `vn`.`expeditionPallet` `ep` ON(`ep`.`truckFk` = `rs`.`id`)
)
LEFT JOIN `vn`.`expeditionScan` `es` ON(`es`.`palletFk` = `ep`.`id`)
)