salix/services/db/install/changes/1.2-CHECK/11.ticketRequest.sql

19 lines
520 B
SQL

USE `vn`;
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `ticketRequest` AS
SELECT
`t`.`Id_ORDEN` AS `id`,
`t`.`ORDEN` AS `description`,
`t`.`CodVENDEDOR` AS `requestFk`,
`t`.`CodCOMPRADOR` AS `atenderFk`,
`t`.`CANTIDAD` AS `quantity`,
`t`.`PRECIOMAX` AS `price`,
`t`.`KO` AS `isOk`,
`t`.`Id_Movimiento` AS `saleFk`,
`t`.`odbc_date` AS `created`
FROM
`vn2008`.`Ordenes` `t`;