ScrewTurn Wiki

Edit

wikibot

TableSales.SalesTerritoryHistory
DescriptionSales representative transfers to other sales territories.

Edit

Columns

ColumnData TypeNullableDefaultDescription
SalesPersonIDintnot null Primary key for SalesTerritoryHistory records.
TerritoryIDintnot null Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID.
StartDatedatetimenot null Date the sales representive started work in the territory.
EndDatedatetimenull Date the sales representative left work in the territory.
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.

Edit

Primary Key

Primary KeyColumns
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryIDSalesPersonID, TerritoryID, StartDate

Edit

Indexes

IndexTypeColumns
AK_SalesTerritoryHistory_rowguidUniquerowguid

Edit

Check Constraints

Check ConstraintExpressionDescription
CK_SalesTerritoryHistory_EndDate(EndDate>=StartDate OR EndDate IS NULL)Check constraint EndDate >= StartDate OR EndDate IS NULL

Edit

Foreign Keys

RelationColumnReferenced Column
Sales.SalesPersonSalesPersonIDSalesPersonID
Sales.SalesTerritoryTerritoryIDTerritoryID

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

Edit

automatically generated

TableSales.SalesTerritoryHistory
DescriptionSales representative transfers to other sales territories.

ColumnData TypeNullableDefaultDescription / PK / Index
SalesPersonIDintnot null Primary key for SalesTerritoryHistory records.
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID
TerritoryIDintnot null Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID.
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID
StartDatedatetimenot null Date the sales representive started work in the territory.
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID
EndDatedatetimenull Date the sales representative left work in the territory.
rowguiduniqueidentifiernot null(NEWID())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_SalesTerritoryHistory_rowguid
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Sales.SalesPersonSalesPersonIDSalesPersonID
Sales.SalesTerritoryTerritoryIDTerritoryID

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

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