46 lines
2.9 KiB
Transact-SQL
46 lines
2.9 KiB
Transact-SQL
CREATE TABLE [dbo].[Cost2Plant] (
|
|
[CodPlant] NVARCHAR (50) NOT NULL,
|
|
[ProcessNum] NVARCHAR (50) NOT NULL,
|
|
[FC] DECIMAL (9, 4) NOT NULL,
|
|
[VC] DECIMAL (9, 4) CONSTRAINT [DF_Cost2Plant_VC] DEFAULT ((0)) NOT NULL,
|
|
[OH] DECIMAL (9, 4) CONSTRAINT [DF_Cost2Plant_OH] DEFAULT ((0)) NOT NULL,
|
|
[SC] DECIMAL (9, 4) CONSTRAINT [DF_Cost2Plant_OH1] DEFAULT ((0)) NOT NULL,
|
|
[QuotaPlantStd] DECIMAL (9, 4) CONSTRAINT [DF_Cost2Plant_QuotaPlantStd] DEFAULT ((0)) NOT NULL,
|
|
[QuotaManStd] DECIMAL (9, 4) CONSTRAINT [DF_Cost2Plant_QuotaManStd] DEFAULT ((0)) NOT NULL,
|
|
CONSTRAINT [PK_Cost2Plant] PRIMARY KEY CLUSTERED ([CodPlant] ASC, [ProcessNum] ASC),
|
|
CONSTRAINT [FK_Cost2Plant_PlantsDet] FOREIGN KEY ([CodPlant]) REFERENCES [dbo].[PlantsDet] ([CodPlant]) ON UPDATE CASCADE
|
|
);
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'codice impianto', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'CodPlant';
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'codice fase, da qui si crea anagrafica fasi distinct', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'ProcessNum';
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Costo Fissi €/h per CDC + FASE', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'FC';
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Costi Variabili €/h per CDC + FASE', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'VC';
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Over Head costo €/h per CDC + FASE', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'OH';
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'costoSETUP €/cambio per CDC + FASE', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'SC';
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'indicazione della quota macchina per produrre quanto registrato', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'QuotaPlantStd';
|
|
|
|
|
|
GO
|
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'indicazione della quota uomo per produrre quanto registrato', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Cost2Plant', @level2type = N'COLUMN', @level2name = N'QuotaManStd';
|
|
|