﻿CREATE TABLE [dbo].[WorkOrderComponent_Curr]
(
	[UniqueID] BIGINT NOT NULL,
	[WorkOrderNumber] BIGINT NOT NULL, 
    [LotNumber] VARCHAR(30) NOT NULL, 
	[BranchCode] VARCHAR(12) NULL,
    [ShortItemNumber] BIGINT NOT NULL,
	[Quantity] DECIMAL(15,2) NOT NULL,
	[LastUpdateDT] DATETIME NOT NULL, 
    CONSTRAINT [PK_WorkOrderComponent_Curr] PRIMARY KEY CLUSTERED([UniqueID])
)
GO

CREATE INDEX [IX_WorkOrderComponent_Curr_WorkOrderNumber] ON [dbo].[WorkOrderComponent_Curr] ([WorkOrderNumber])
GO

CREATE INDEX [IX_WorkOrderComponent_Curr_LotLookup] ON [dbo].[WorkOrderComponent_Curr] ([LotNumber], [ShortItemNumber], [BranchCode])
GO