CREATE TABLE [dbo].[ATVariableInstanceDate] (
    [InstanceID]  INT           NOT NULL,
    [VariableID]  INT           NOT NULL,
    [Value]       DATETIME      NOT NULL,
    [ReferenceID] INT           NULL,
    [Name]        NVARCHAR (50) NOT NULL,
    [DataType]    INT           NOT NULL,
    CONSTRAINT [PK_ATVariableInstanceDate] PRIMARY KEY CLUSTERED ([InstanceID] ASC)
);


GO
CREATE NONCLUSTERED INDEX [RefID]
    ON [dbo].[ATVariableInstanceDate]([ReferenceID] ASC);

