﻿CREATE TABLE [tmp].[OrdersHistRaw] (
    [OrdNum]          NVARCHAR (50) NOT NULL,
    [OrdRow]          NVARCHAR (50) NOT NULL,
    [OrdDate]         NVARCHAR (50) NOT NULL,
    [CodClient]       NVARCHAR (50) NOT NULL,
    [CodItem]         NVARCHAR (50) NOT NULL,
    [RawMat]          NVARCHAR (50) NOT NULL,
    [RawMatCost]      NVARCHAR (50) NOT NULL,
    [BatchQty]        NVARCHAR (50) NOT NULL,
    [CodInco]         NVARCHAR (50) NOT NULL,
    [OrdPrice]        NVARCHAR (50) NOT NULL,
    [RawMatExtraCost] NVARCHAR (50) NOT NULL,
    [PriceOff]        NVARCHAR (50) NOT NULL,
    [OrdQty]          NVARCHAR (50) NOT NULL,
    [ProvvCost]       NVARCHAR (50) CONSTRAINT [DF_OrdersHistRaw_ProvCost] DEFAULT ((0)) NOT NULL
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Prezzo finale ordine', @level0type = N'SCHEMA', @level0name = N'tmp', @level1type = N'TABLE', @level1name = N'OrdersHistRaw', @level2type = N'COLUMN', @level2name = N'OrdPrice';


GO
EXECUTE sp_addextendedproperty @name = N'Note', @value = N'Import storico ordini per Quote_C', @level0type = N'SCHEMA', @level0name = N'tmp', @level1type = N'TABLE', @level1name = N'OrdersHistRaw';

