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

14 lines
433 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`intrastat_data`
AS SELECT `ii`.`id` AS `id`,
`ii`.`invoiceInFk` AS `recibida_id`,
`ii`.`net` AS `neto`,
`ii`.`intrastatFk` AS `intrastat_id`,
`ii`.`amount` AS `importe`,
`ii`.`stems` AS `unidades`,
`ii`.`countryFk` AS `Paises_Id`,
`ii`.`dated` AS `odbc_date`,
`ii`.`statisticalValue` AS `valorestadistico`
FROM `vn`.`invoiceInIntrastat` `ii`