CREATE TABLE [dbo].[ElencoDataMatrix] (
    [CodDataMatrix]      NUMERIC (23)  NOT NULL,
    [CodGitterbox]       NVARCHAR (50) CONSTRAINT [DF_ElencoDataMatrix_CodGitterbox] DEFAULT ('') NOT NULL,
    [NumConchiglia]      INT           NULL,
    [NumDisegno]         NUMERIC (7)   NULL,
    [EsponenteDisegno]   TINYINT       NULL,
    [CodDifettoScarto]   VARCHAR (5)   CONSTRAINT [DF_ElencoDataMatrix_CodDifettoScarto] DEFAULT ('') NULL,
    [InizioPreparazione] SMALLDATETIME NULL,
    [FinePreparazione]   SMALLDATETIME NULL,
    [InizioIniezione]    SMALLDATETIME NULL,
    [FineIniezione]      SMALLDATETIME NULL,
    [MagDestinazione]    VARCHAR (2)   CONSTRAINT [DF_ElencoDataMatrix_MagDestinazione] DEFAULT ('') NULL,
    [DataImport]         SMALLDATETIME NULL,
    CONSTRAINT [PK_ElencoDataMatrix] PRIMARY KEY CLUSTERED ([CodDataMatrix] ASC) WITH (FILLFACTOR = 95),
    CONSTRAINT [FK_ElencoDataMatrix_ElencoCartellini] FOREIGN KEY ([CodGitterbox]) REFERENCES [dbo].[ElencoCartellini] ([UDC]) ON UPDATE CASCADE
);




GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Codice Data Matrix', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'CodDataMatrix';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Codice Gitterbox', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'CodGitterbox';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Numero Conchiglia', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'NumConchiglia';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Numero Disegno del Pezzo', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'NumDisegno';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Esponente Disegno', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'EsponenteDisegno';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Codice Difetto Causa Scarto del Pezzo', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'CodDifettoScarto';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Inizio Preparazione Gitterbox', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'InizioPreparazione';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Fine Preparazione Gitterbox', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'FinePreparazione';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Inizio Iniezione Pezzo', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'InizioIniezione';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Fine Iniezione Pezzo', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'FineIniezione';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Magazzino di Partenza', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'MagDestinazione';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Data dell''import della riga', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ElencoDataMatrix', @level2type = N'COLUMN', @level2name = N'DataImport';

