Difference between revisions of "Production.ProductListPriceHistory (table)"
| (7 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| − | |- | + | |- valign="top" |
| '''Table | | '''Table | ||
| Production.ProductListPriceHistory | | Production.ProductListPriceHistory | ||
| − | |- | + | |- valign="top" |
| + | | '''Description | ||
| + | | Changes in the list price of a product over time. | ||
|} | |} | ||
| − | + | === Columns === | |
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| Line 15: | Line 17: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
| − | | ''' | + | | '''Description |
| − | + | ||
| − | + | |- valign="top" | |
| − | |- | ||
| ProductID | | ProductID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
| − | | | + | | Product identification number. Foreign key to Product.ProductID |
| − | + | |- valign="top" | |
| − | |- | ||
| StartDate | | StartDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| | | | ||
| − | | | + | | List price start date. |
| − | + | |- valign="top" | |
| − | |- | ||
| EndDate | | EndDate | ||
| datetime | | datetime | ||
| null | | null | ||
| | | | ||
| − | | | + | | List price end date |
| − | + | |- valign="top" | |
| − | |- | ||
| ListPrice | | ListPrice | ||
| money | | money | ||
| not null | | not null | ||
| | | | ||
| − | | | + | | Product list price. |
| − | + | |- valign="top" | |
| − | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
| − | | | + | | Date and time the record was last updated. |
| − | |||
|} | |} | ||
| + | === Primary Key === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Primary Key | ||
| + | | '''Columns | ||
| + | |- valign="top" | ||
| + | | PK_ProductListPriceHistory_ProductID_StartDate | ||
| + | | ProductID, StartDate | ||
| + | |} | ||
| + | === Check Constraints === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Check Constraint | ||
| + | | '''Expression | ||
| + | | '''Description | ||
| + | |- valign="top" | ||
| + | | CK_ProductListPriceHistory_EndDate | ||
| + | | ([EndDate]>=[StartDate] OR [EndDate] IS NULL) | ||
| + | | Check constraint [EndDate] >= [StartDate] OR [EndDate] IS NULL | ||
| + | |- valign="top" | ||
| + | | CK_ProductListPriceHistory_ListPrice | ||
| + | | ([ListPrice]>(0.00)) | ||
| + | | Check constraint [ListPrice] > (0.00) | ||
| + | |} | ||
| + | |||
| + | === Foreign Keys === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| Line 62: | Line 84: | ||
| '''Column | | '''Column | ||
| '''Referenced Column | | '''Referenced Column | ||
| − | + | ||
| − | |- | + | |- valign="top" |
| [[Production.Product_(table)|Production.Product]] | | [[Production.Product_(table)|Production.Product]] | ||
| ProductID | | ProductID | ||
| ProductID | | ProductID | ||
|} | |} | ||
| + | |||
| + | === References === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Dependency Type | ||
| + | | '''Object Type | ||
| + | | '''Referenced Object | ||
| + | |||
| + | |- valign="top" | ||
| + | | Schema | ||
| + | | Schema | ||
| + | | [[Production_(schema)|Production]] | ||
| + | |||
| + | |} | ||
| + | |||
| + | === Dependencies === | ||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Reference Type | ||
| + | | '''Object Type | ||
| + | | '''Referencing Object | ||
| + | |||
| + | |- valign="top" | ||
| + | | Select | ||
| + | | Function | ||
| + | | [[dbo.ufnGetProductDealerPrice_(function)|dbo.ufnGetProductDealerPrice]] | ||
| + | |||
| + | |- valign="top" | ||
| + | | Select | ||
| + | | Function | ||
| + | | [[dbo.ufnGetProductListPrice_(function)|dbo.ufnGetProductListPrice]] | ||
| + | |||
| + | |} | ||
| + | |||
| + | |||
== automatically generated == | == automatically generated == | ||
| Line 74: | Line 131: | ||
| '''Table | | '''Table | ||
| Production.ProductListPriceHistory | | Production.ProductListPriceHistory | ||
| − | |- | + | |- valign="top" |
| − | |||
| '''Description | | '''Description | ||
| Changes in the list price of a product over time. | | Changes in the list price of a product over time. | ||
|- | |- | ||
| − | |||
|} | |} | ||
| Line 96: | Line 151: | ||
| not null | | not null | ||
| | | | ||
| − | | Product identification number. Foreign key to Product. | + | | Product identification number. Foreign key to Product.ProductID<br />PK_ProductListPriceHistory_ProductID_StartDate |
|- valign="top" | |- valign="top" | ||
| StartDate | | StartDate | ||
| Line 102: | Line 157: | ||
| not null | | not null | ||
| | | | ||
| − | | List price start date.PK_ProductListPriceHistory_ProductID_StartDate | + | | List price start date.<br />PK_ProductListPriceHistory_ProductID_StartDate |
|- valign="top" | |- valign="top" | ||
| EndDate | | EndDate | ||
| Line 108: | Line 163: | ||
| null | | null | ||
| | | | ||
| − | | List price end date | + | | List price end date<br /> |
|- valign="top" | |- valign="top" | ||
| ListPrice | | ListPrice | ||
| Line 114: | Line 169: | ||
| not null | | not null | ||
| | | | ||
| − | | Product list price. | + | | Product list price.<br /> |
|- valign="top" | |- valign="top" | ||
| ModifiedDate | | ModifiedDate | ||
| Line 120: | Line 175: | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
| − | | Date and time the record was last updated. | + | | Date and time the record was last updated.<br /> |
|} | |} | ||
| Line 140: | Line 195: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
| − | | ''' | + | | '''Dependency Type |
| '''Object Type | | '''Object Type | ||
| + | | '''Referenced Object | ||
| + | |||
| + | |- | ||
| + | | Schema | ||
| + | | Schema | ||
| + | | [[Production_(schema)|Production]] | ||
| + | |||
| + | |} | ||
| + | |||
| + | |||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| '''Reference Type | | '''Reference Type | ||
| − | + | | '''Object Type | |
| + | | '''Referencing Object | ||
| + | |||
|- | |- | ||
| + | | Select | ||
| + | | Function | ||
| [[dbo.ufnGetProductDealerPrice_(function)|dbo.ufnGetProductDealerPrice]] | | [[dbo.ufnGetProductDealerPrice_(function)|dbo.ufnGetProductDealerPrice]] | ||
| + | |||
| + | |- | ||
| + | | Select | ||
| Function | | Function | ||
| − | |||
| − | |||
| [[dbo.ufnGetProductListPrice_(function)|dbo.ufnGetProductListPrice]] | | [[dbo.ufnGetProductListPrice_(function)|dbo.ufnGetProductListPrice]] | ||
| − | + | ||
| − | |||
|} | |} | ||
Latest revision as of 23:16, 23 June 2010
Contents
wikibot[edit]
| Table | Production.ProductListPriceHistory |
| Description | Changes in the list price of a product over time. |
Columns[edit]
| Column | Data Type | Nullable | Default | Description |
| ProductID | int | not null | Product identification number. Foreign key to Product.ProductID | |
| StartDate | datetime | not null | List price start date. | |
| EndDate | datetime | null | List price end date | |
| ListPrice | money | not null | Product list price. | |
| ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated. |
Primary Key[edit]
| Primary Key | Columns |
| PK_ProductListPriceHistory_ProductID_StartDate | ProductID, StartDate |
Check Constraints[edit]
| Check Constraint | Expression | Description |
| CK_ProductListPriceHistory_EndDate | ([EndDate]>=[StartDate] OR [EndDate] IS NULL) | Check constraint [EndDate] >= [StartDate] OR [EndDate] IS NULL |
| CK_ProductListPriceHistory_ListPrice | ([ListPrice]>(0.00)) | Check constraint [ListPrice] > (0.00) |
Foreign Keys[edit]
| Relation | Column | Referenced Column |
| Production.Product | ProductID | ProductID |
References[edit]
| Dependency Type | Object Type | Referenced Object |
| Schema | Schema | Production |
Dependencies[edit]
| Reference Type | Object Type | Referencing Object |
| Select | Function | dbo.ufnGetProductDealerPrice |
| Select | Function | dbo.ufnGetProductListPrice |
automatically generated[edit]
| Table | Production.ProductListPriceHistory |
| Description | Changes in the list price of a product over time. |
| Column | Data Type | Nullable | Default | Description / PK / Index |
| ProductID | int | not null | Product identification number. Foreign key to Product.ProductID PK_ProductListPriceHistory_ProductID_StartDate | |
| StartDate | datetime | not null | List price start date. PK_ProductListPriceHistory_ProductID_StartDate | |
| EndDate | datetime | null | List price end date | |
| ListPrice | money | not null | Product list price. | |
| ModifiedDate | datetime | not null | (GETDATE()) | Date and time the record was last updated. |
| Relation | Column | Referenced Column |
| Production.Product | ProductID | ProductID |
| Dependency Type | Object Type | Referenced Object |
| Schema | Schema | Production |
| Reference Type | Object Type | Referencing Object |
| Select | Function | dbo.ufnGetProductDealerPrice |
| Select | Function | dbo.ufnGetProductListPrice |