ScrewTurn Wiki
Navigation
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
Advanced Search »
Back
History
Sales.SalesTerritory_(table)
== wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- valign="top" | '''Table''' | Sales.SalesTerritory |- valign="top" | '''Description''' | Sales territory lookup table. |} === Columns === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Column''' | '''Data Type''' | '''Nullable''' | '''Default''' | '''Description''' |- valign="top" | TerritoryID | int | not null | | Primary key for SalesTerritory records. |- valign="top" | Name | dbo.Name | not null | | Sales territory description |- valign="top" | CountryRegionCode | nvarchar(3) | not null | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. |- valign="top" | Group | nvarchar(50) | not null | | Geographic area to which the sales territory belong. |- valign="top" | SalesYTD | money | not null | ((0.00)) | Sales in the territory year to date. |- valign="top" | SalesLastYear | money | not null | ((0.00)) | Sales in the territory the previous year. |- valign="top" | CostYTD | money | not null | ((0.00)) | Business costs in the territory year to date. |- valign="top" | CostLastYear | money | not null | ((0.00)) | Business costs in the territory the previous year. |- valign="top" | rowguid | uniqueidentifier | not null | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |- valign="top" | ModifiedDate | datetime | not null | (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_SalesTerritory_TerritoryID | TerritoryID |} === Indexes === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Index''' | '''Type''' | '''Columns''' |- valign="top" | AK_SalesTerritory_Name | Unique | Name |- valign="top" | AK_SalesTerritory_rowguid | Unique | rowguid |} === Check Constraints === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Check Constraint''' | '''Expression''' | '''Description''' |- valign="top" | CK_SalesTerritory_CostLastYear | ([CostLastYear]>=(0.00)) | Check constraint [CostLastYear] >= (0.00) |- valign="top" | CK_SalesTerritory_CostYTD | ([CostYTD]>=(0.00)) | Check constraint [CostYTD] >= (0.00) |- valign="top" | CK_SalesTerritory_SalesLastYear | ([SalesLastYear]>=(0.00)) | Check constraint [SalesLastYear] >= (0.00) |- valign="top" | CK_SalesTerritory_SalesYTD | ([SalesYTD]>=(0.00)) | Check constraint [SalesYTD] >= (0.00) |} === Detail Tables === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Detail Table''' | '''Column''' | '''Referencing Column''' |- valign="top" | [[Sales.Customer_(table)|Sales.Customer]] | TerritoryID | TerritoryID |- valign="top" | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | TerritoryID | TerritoryID |- valign="top" | [[Sales.SalesPerson_(table)|Sales.SalesPerson]] | TerritoryID | TerritoryID |- valign="top" | [[Sales.SalesTerritoryHistory_(table)|Sales.SalesTerritoryHistory]] | TerritoryID | TerritoryID |- valign="top" | [[Person.StateProvince_(table)|Person.StateProvince]] | TerritoryID | TerritoryID |} === References === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Dependency Type''' | '''Object Type''' | '''Referenced Object''' |- valign="top" | Data Type | Type | [[dbo.Name_(type)|dbo.Name]] |- valign="top" | Schema | Schema | [[Sales_(schema)|Sales]] |} === Dependencies === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Reference Type''' | '''Object Type''' | '''Referencing Object''' | '''Child Type''' | '''Child Object''' |- valign="top" | Select | View | [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]] | | |- valign="top" | Select | View | [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]] | | |- valign="top" | Update | Table | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | Trigger | uSalesOrderHeader |} == wikivalues == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- valign="top" | '''Table Values''' | Sales.SalesTerritory |} {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''TerritoryID''' | '''Name''' | '''CountryRegionCode''' | '''Group''' |- valign="top" | 1 | Northwest | US | North America |- valign="top" | 2 | Northeast | US | North America |- valign="top" | 3 | Central | US | North America |- valign="top" | 4 | Southwest | US | North America |- valign="top" | 5 | Southeast | US | North America |- valign="top" | 6 | Canada | CA | North America |- valign="top" | 7 | France | FR | Europe |- valign="top" | 8 | Germany | DE | Europe |- valign="top" | 9 | Australia | AU | Pacific |- valign="top" | 10 | United Kingdom | GB | Europe |} == automatically generated == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- | '''Table''' | Sales.SalesTerritory |- valign="top" | '''Description''' | Sales territory lookup table. |- |- |} {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Column''' | '''Data Type''' | '''Nullable''' | '''Default''' | '''Description / PK / Index''' |- | TerritoryID | int | not null | | Primary key for SalesTerritory records.<br />PK_SalesTerritory_TerritoryID |- | Name | Name | not null | | Sales territory description<br />AK_SalesTerritory_Name |- | CountryRegionCode | nvarchar(3) | not null | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. <br /> |- | Group | nvarchar(50) | not null | | Geographic area to which the sales territory belong.<br /> |- | SalesYTD | money | not null | (0.00) | Sales in the territory year to date.<br /> |- | SalesLastYear | money | not null | (0.00) | Sales in the territory the previous year.<br /> |- | CostYTD | money | not null | (0.00) | Business costs in the territory year to date.<br /> |- | CostLastYear | money | not null | (0.00) | Business costs in the territory the previous year.<br /> |- | rowguid | uniqueidentifier | not null | (NEWID()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.<br />AK_SalesTerritory_rowguid |- | ModifiedDate | datetime | not null | (GETDATE()) | Date and time the record was last updated.<br /> |} {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Detail Table''' | '''Column''' | '''Referencing Column''' |- | [[Sales.Customer_(table)|Sales.Customer]] | TerritoryID | TerritoryID |- | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | TerritoryID | TerritoryID |- | [[Sales.SalesPerson_(table)|Sales.SalesPerson]] | TerritoryID | TerritoryID |- | [[Sales.SalesTerritoryHistory_(table)|Sales.SalesTerritoryHistory]] | TerritoryID | TerritoryID |- | [[Person.StateProvince_(table)|Person.StateProvince]] | TerritoryID | TerritoryID |} {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Dependency Type''' | '''Object Type''' | '''Referenced Object''' |- | Data Type | Type | [[dbo.Name_(type)|dbo.Name]] |- | Schema | Schema | [[Sales_(schema)|Sales]] |} {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Reference Type''' | '''Object Type''' | '''Referencing Object''' | '''Child Type''' | '''Child Object''' |- | Select | View | [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]] |- | Select | View | [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]] |- | Update | Table | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | Trigger | uSalesOrderHeader |}
ScrewTurn Wiki version 2.0.36. Some of the icons created by
FamFamFam
.