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

20 lines
626 B
SQL

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`Consignatarios`
AS SELECT `a`.`id` AS `id_consigna`,
`a`.`clientFk` AS `Id_cliente`,
`a`.`street` AS `domicilio`,
`a`.`city` AS `poblacion`,
`a`.`postalCode` AS `codPostal`,
`a`.`provinceFk` AS `province_id`,
`a`.`phone` AS `telefono`,
`a`.`mobile` AS `movil`,
`a`.`nickname` AS `consignatario`,
`a`.`isDefaultAddress` AS `predeterminada`,
`a`.`longitude` AS `longitude`,
`a`.`latitude` AS `latitude`,
`a`.`agencyModeFk` AS `Id_Agencia`,
`a`.`isEqualizated` AS `isEqualizated`,
`a`.`isActive` AS `active`
FROM `vn`.`address` `a`