-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.27-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
--
-- Create schema my_crctrace
--
CREATE DATABASE IF NOT EXISTS my_crctrace;
USE my_crctrace;
--
-- Temporary table structure for view `codfil`
--
DROP TABLE IF EXISTS `codfil`;
DROP VIEW IF EXISTS `codfil`;
CREATE TABLE `codfil` (
`CodFil` int(10) unsigned,
`codcomm` char(6),
`codattore` varchar(7),
`operazionep` varchar(50),
`operazionei` varchar(50),
`operazionet` varchar(50),
`operazionec` varchar(50),
`nomec` varchar(45),
`comunec` varchar(45),
`nomei` varchar(45),
`comunei` varchar(45),
`nomep` varchar(45),
`comunep` varchar(45),
`nomet` varchar(45)
);
--
-- Definition of view `codfil`
--
DROP TABLE IF EXISTS `codfil`;
DROP VIEW IF EXISTS `codfil`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `codfil` AS select `tracc_comm`.`CodFil` AS `CodFil`,`tracc_comm`.`codcomm` AS `codcomm`,`pacco`.`codattore` AS `codattore`,`pacco`.`operazionep` AS `operazionep`,`pacco`.`operazionei` AS `operazionei`,`pacco`.`operazionet` AS `operazionet`,`pacco`.`operazionec` AS `operazionec`,`confezionatori`.`Nome` AS `nomec`,`confezionatori`.`Comune` AS `comunec`,`intermediari`.`Nome` AS `nomei`,`intermediari`.`Comune` AS `comunei`,`produttori`.`Nome` AS `nomep`,`produttori`.`Comune` AS `comunep`,`trasformatori`.`Nome` AS `nomet` from (((((`tracc_comm` left join `pacco` on((`tracc_comm`.`codcomm` = `pacco`.`codcomm`))) left join `confezionatori` on((`pacco`.`codattore` = `confezionatori`.`CodiceC`))) left join `intermediari` on((`pacco`.`codattore` = `intermediari`.`CodiceI`))) left join `trasformatori` on((`pacco`.`codattore` = `trasformatori`.`CodiceT`))) left join `produttori` on((`pacco`.`codattore` = `produttori`.`CodiceP`)));
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;