salix/db/routines/vn2008/views/Rutas.sql

20 lines
555 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`Rutas`
AS SELECT `r`.`id` AS `Id_Ruta`,
`r`.`workerFk` AS `Id_Trabajador`,
`r`.`created` AS `Fecha`,
`r`.`vehicleFk` AS `Id_Vehiculo`,
`r`.`agencyModeFk` AS `Id_Agencia`,
`r`.`time` AS `Hora`,
`r`.`isOk` AS `ok`,
`r`.`kmStart` AS `km_start`,
`r`.`kmEnd` AS `km_end`,
`r`.`started` AS `date_start`,
`r`.`finished` AS `date_end`,
`r`.`gestdocFk` AS `gestdoc_id`,
`r`.`cost` AS `cost`,
`r`.`m3` AS `m3`,
`r`.`description` AS `description`
FROM `vn`.`route` `r`