Tables [dbo].[ICItemPrices]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:56:27 AM Thursday, March 21, 2019
Last Modified1:11:25 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Key IX_ICItemPrices_ItemID: ItemID\PriceLevelID\Quantity\StartDate\EndDateForeign Keys FK_ICItemPrices_ItemID_ICItems: [dbo].[ICItems].ItemIDItemIDint4
False
Cluster Key IX_ICItemPrices_ItemID: ItemID\PriceLevelID\Quantity\StartDate\EndDateForeign Keys FK_ICItemPrices_PriceLevelID_ARPriceLevels: [dbo].[ARPriceLevels].PriceLevelIDPriceLevelIDint4
False
Cluster Key IX_ICItemPrices_ItemID: ItemID\PriceLevelID\Quantity\StartDate\EndDateQuantitydecimal(16,6)9
False
Methodvarchar(3)3
False
Pricemoney8
False
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
Primary Key PK_ICItemPrices: ItemPriceIDItemPriceIDint4
False
1 - 1
Cluster Key IX_ICItemPrices_ItemID: ItemID\PriceLevelID\Quantity\StartDate\EndDateStartDatedatetime8
True
Cluster Key IX_ICItemPrices_ItemID: ItemID\PriceLevelID\Quantity\StartDate\EndDateEndDatedatetime8
True
KeyNameKey ColumnsUniqueFill Factor
Primary Key PK_ICItemPrices: ItemPriceIDPK_ICItemPricesItemPriceID
True
80
Cluster Key IX_ICItemPrices_ItemID: ItemID\PriceLevelID\Quantity\StartDate\EndDateIX_ICItemPrices_ItemIDItemID, PriceLevelID, Quantity, StartDate, EndDate
True
80
NameColumns
FK_ICItemPrices_ItemID_ICItemsItemID->[dbo].[ICItems].[ItemID]
FK_ICItemPrices_PriceLevelID_ARPriceLevelsPriceLevelID->[dbo].[ARPriceLevels].[PriceLevelID]
CREATE TABLE [dbo].[ICItemPrices]
(
[ItemID] [int] NOT NULL,
[PriceLevelID] [int] NOT NULL,
[Quantity] [decimal] (16, 6) NOT NULL,
[Method] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Price] [money] NOT NULL,
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_ICItemPrices_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_ICItemPrices_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[ItemPriceID] [int] NOT NULL IDENTITY(1, 1),
[StartDate] [datetime] NULL,
[EndDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICItemPrices] ADD CONSTRAINT [PK_ICItemPrices] PRIMARY KEY NONCLUSTERED  ([ItemPriceID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICItemPrices] ADD CONSTRAINT [IX_ICItemPrices_ItemID] UNIQUE CLUSTERED  ([ItemID], [PriceLevelID], [Quantity], [StartDate], [EndDate]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICItemPrices] ADD CONSTRAINT [FK_ICItemPrices_ItemID_ICItems] FOREIGN KEY ([ItemID]) REFERENCES [dbo].[ICItems] ([ItemID])
GO
ALTER TABLE [dbo].[ICItemPrices] ADD CONSTRAINT [FK_ICItemPrices_PriceLevelID_ARPriceLevels] FOREIGN KEY ([PriceLevelID]) REFERENCES [dbo].[ARPriceLevels] ([PriceLevelID])
GO
  • [dbo].[v_ICItemPrices]