Sales.SpecialDeals
| Documentation | WideWorldImporters |
| Schema | Sales |
| Name | SpecialDeals |
| Module | Sales |
Columns
| Key | Name | Data type | Null | Attributes | References | Description | ||
|---|---|---|---|---|---|---|---|---|
| 1 | SpecialDealID | int | Default: NEXT VALUE FOR [Sequences].[SpecialDealID] | ID (sequence based) for a special deal | ||||
| ID (sequence based) for a special deal Default: NEXT VALUE FOR [Sequences].[SpecialDealID] |
||||||||
| 2 | StockItemID | int | Warehouse.StockItems | Stock item that the deal applies to (if NULL, then only discounts are permitted not unit prices) | ||||
| Stock item that the deal applies to (if NULL, then only discounts are permitted not unit prices) References: Warehouse.StockItems |
||||||||
| 3 | CustomerID | int | Sales.Customers | ID of the customer that the special pricing applies to (if NULL then all customers) | ||||
| ID of the customer that the special pricing applies to (if NULL then all customers) References: Sales.Customers |
||||||||
| 4 | BuyingGroupID | int | Sales.BuyingGroups | ID of the buying group that the special pricing applies to (optional) | ||||
| ID of the buying group that the special pricing applies to (optional) References: Sales.BuyingGroups |
||||||||
| 5 | CustomerCategoryID | int | Sales.CustomerCategories | ID of the customer category that the special pricing applies to (optional) | ||||
| ID of the customer category that the special pricing applies to (optional) References: Sales.CustomerCategories |
||||||||
| 6 | StockGroupID | int | Warehouse.StockGroups | ID of the stock group that the special pricing applies to (optional) | ||||
| ID of the stock group that the special pricing applies to (optional) References: Warehouse.StockGroups |
||||||||
| 7 | DealDescription | nvarchar(30) | Description of the special deal | |||||
| Description of the special deal |
||||||||
| 8 | StartDate | date | Date that the special pricing starts from | |||||
| Date that the special pricing starts from |
||||||||
| 9 | EndDate | date | Date that the special pricing ends on | |||||
| Date that the special pricing ends on |
||||||||
| 10 | DiscountAmount | decimal(18, 2) | Discount per unit to be applied to sale price (optional) | |||||
| Discount per unit to be applied to sale price (optional) |
||||||||
| 11 | DiscountPercentage | decimal(18, 3) | Discount percentage per unit to be applied to sale price (optional) | |||||
| Discount percentage per unit to be applied to sale price (optional) |
||||||||
| 12 | UnitPrice | decimal(18, 2) | Special price per unit to be applied instead of sale price (optional) | |||||
| Special price per unit to be applied instead of sale price (optional) |
||||||||
| 13 | LastEditedBy | int | Application.People | |||||
| References: Application.People | ||||||||
| 14 | LastEditedWhen | datetime2(7) | Default: sysdatetime() | When this row was last edited | ||||
| When this row was last edited Default: sysdatetime() |
||||||||
Relations
| Foreign table | Primary table | Join | Title / Name / Description | |
|---|---|---|---|---|
| Sales.SpecialDeals | Sales.BuyingGroups | Sales.SpecialDeals.BuyingGroupID = Sales.BuyingGroups.BuyingGroupID | FK_Sales_SpecialDeals_BuyingGroupID_Sales_BuyingGroups Foreign key constraint referencing BuyingGroups.BuyingGroupID |
|
|
Sales.SpecialDeals.BuyingGroupID = Sales.BuyingGroups.BuyingGroupID Name: FK_Sales_SpecialDeals_BuyingGroupID_Sales_BuyingGroupsForeign key constraint referencing BuyingGroups.BuyingGroupID |
||||
| Sales.SpecialDeals | Sales.CustomerCategories | Sales.SpecialDeals.CustomerCategoryID = Sales.CustomerCategories.CustomerCategoryID | FK_Sales_SpecialDeals_CustomerCategoryID_Sales_CustomerCategories Foreign key constraint referencing CustomerCategories.CustomerCategoryID |
|
|
Sales.SpecialDeals.CustomerCategoryID = Sales.CustomerCategories.CustomerCategoryID Name: FK_Sales_SpecialDeals_CustomerCategoryID_Sales_CustomerCategoriesForeign key constraint referencing CustomerCategories.CustomerCategoryID |
||||
| Sales.SpecialDeals | Sales.Customers | Sales.SpecialDeals.CustomerID = Sales.Customers.CustomerID | FK_Sales_SpecialDeals_CustomerID_Sales_Customers Foreign key constraint referencing Customers.CustomerID |
|
|
Sales.SpecialDeals.CustomerID = Sales.Customers.CustomerID Name: FK_Sales_SpecialDeals_CustomerID_Sales_CustomersForeign key constraint referencing Customers.CustomerID |
||||
| Sales.SpecialDeals | Application.People | Sales.SpecialDeals.LastEditedBy = Application.People.PersonID | FK_Sales_SpecialDeals_Application_People Foreign key constraint referencing People.PersonID |
|
|
Sales.SpecialDeals.LastEditedBy = Application.People.PersonID Name: FK_Sales_SpecialDeals_Application_PeopleForeign key constraint referencing People.PersonID |
||||
| Sales.SpecialDeals | Warehouse.StockGroups | Sales.SpecialDeals.StockGroupID = Warehouse.StockGroups.StockGroupID | FK_Sales_SpecialDeals_StockGroupID_Warehouse_StockGroups Foreign key constraint referencing StockGroups.StockGroupID |
|
|
Sales.SpecialDeals.StockGroupID = Warehouse.StockGroups.StockGroupID Name: FK_Sales_SpecialDeals_StockGroupID_Warehouse_StockGroupsForeign key constraint referencing StockGroups.StockGroupID |
||||
| Sales.SpecialDeals | Warehouse.StockItems | Sales.SpecialDeals.StockItemID = Warehouse.StockItems.StockItemID | FK_Sales_SpecialDeals_StockItemID_Warehouse_StockItems Foreign key constraint referencing StockItems.StockItemID |
|
|
Sales.SpecialDeals.StockItemID = Warehouse.StockItems.StockItemID Name: FK_Sales_SpecialDeals_StockItemID_Warehouse_StockItemsForeign key constraint referencing StockItems.StockItemID |
||||
Unique keys
| Key name | Columns | Description | |
|---|---|---|---|
| PK_Sales_SpecialDeals | SpecialDealID | Primary key (clustered) constraint. | |
| Primary key (clustered) constraint. | |||
Uses
| Name |
|---|
|
Sales.SpecialDeals
|
Exported: 2019-02-04 23:04, Last imported: 2018-08-10 09:51
