Welcome Guest, you are in: Login

devio dbscript ScrewTurn Wiki

RSS RSS

Navigation





Search the wiki
»

PoweredBy

Page History: Sales SalesTerritory (table)

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: 2010/06/24 01:10


wikibot

TableSales.SalesTerritory
DescriptionSales territory lookup table.

Columns

ColumnData TypeNullableDefaultDescription
TerritoryIDintnot null Primary key for SalesTerritory records.
Namedbo.Namenot null Sales territory description
CountryRegionCodenvarchar(3)not null ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
Groupnvarchar(50)not null Geographic area to which the sales territory belong.
SalesYTDmoneynot null((0.00))Sales in the territory year to date.
SalesLastYearmoneynot null((0.00))Sales in the territory the previous year.
CostYTDmoneynot null((0.00))Business costs in the territory year to date.
CostLastYearmoneynot null((0.00))Business costs in the territory the previous year.
rowguiduniqueidentifiernot null(newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Primary Key

Primary KeyColumns
PK_SalesTerritory_TerritoryIDTerritoryID

Indexes

IndexTypeColumns
AK_SalesTerritory_NameUniqueName
AK_SalesTerritory_rowguidUniquerowguid

Check Constraints

Check ConstraintExpressionDescription
CK_SalesTerritory_CostLastYear(CostLastYear>=(0.00))Check constraint CostLastYear >= (0.00)
CK_SalesTerritory_CostYTD(CostYTD>=(0.00))Check constraint CostYTD >= (0.00)
CK_SalesTerritory_SalesLastYear(SalesLastYear>=(0.00))Check constraint SalesLastYear >= (0.00)
CK_SalesTerritory_SalesYTD(SalesYTD>=(0.00))Check constraint SalesYTD >= (0.00)

Detail Tables

Detail TableColumnReferencing Column
Sales.CustomerTerritoryIDTerritoryID
Sales.SalesOrderHeaderTerritoryIDTerritoryID
Sales.SalesPersonTerritoryIDTerritoryID
Sales.SalesTerritoryHistoryTerritoryIDTerritoryID
Person.StateProvinceTerritoryIDTerritoryID

References

Dependency TypeObject TypeReferenced Object
Data TypeTypedbo.Name
SchemaSchemaSales

Dependencies

Reference TypeObject TypeReferencing ObjectChild TypeChild Object
SelectViewSales.vSalesPerson  
SelectViewSales.vSalesPersonSalesByFiscalYears  
UpdateTableSales.SalesOrderHeaderTriggeruSalesOrderHeader

wikivalues

Table ValuesSales.SalesTerritory

TerritoryIDNameCountryRegionCodeGroup
1NorthwestUSNorth America
2NortheastUSNorth America
3CentralUSNorth America
4SouthwestUSNorth America
5SoutheastUSNorth America
6CanadaCANorth America
7FranceFREurope
8GermanyDEEurope
9AustraliaAUPacific
10United KingdomGBEurope

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam.