﻿CREATE TABLE [dbo].[LotUsage_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_LotUsage_Curr] PRIMARY KEY CLUSTERED([UniqueID])
)
GO

CREATE INDEX [IX_LotUsage_Curr_WorkOrderNumber] ON [dbo].[LotUsage_Curr] ([WorkOrderNumber])
GO

CREATE INDEX [IX_LotUsage_Curr_LotLookup] ON [dbo].[LotUsage_Curr] ([LotNumber], [ShortItemNumber], [BranchCode])
GO