salix/db/routines/hedera/views/myTicket.sql

17 lines
509 B
SQL

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `hedera`.`myTicket`
AS SELECT `t`.`id` AS `id`,
`t`.`clientFk` AS `clientFk`,
`t`.`warehouseFk` AS `warehouseFk`,
`t`.`shipped` AS `shipped`,
`t`.`landed` AS `landed`,
`t`.`nickname` AS `nickname`,
`t`.`agencyModeFk` AS `agencyModeFk`,
`t`.`refFk` AS `refFk`,
`t`.`addressFk` AS `addressFk`,
`t`.`location` AS `location`,
`t`.`companyFk` AS `companyFk`
FROM `vn`.`ticket` `t`
WHERE `t`.`clientFk` = `account`.`myUser_getId`()