Welcome Guest, you are in: Login

devio dbscript ScrewTurn Wiki

RSS RSS

Navigation





Search the wiki
»

PoweredBy

Page History: Sales SalesTerritoryHistory (table)

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: 2010/06/24 01:10


wikibot

TableSales.SalesTerritoryHistory
DescriptionSales representative transfers to other sales territories.

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.

Primary Key

Primary KeyColumns
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryIDSalesPersonID, TerritoryID, StartDate

Indexes

IndexTypeColumns
AK_SalesTerritoryHistory_rowguidUniquerowguid

Check Constraints

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

Foreign Keys

RelationColumnReferenced Column
Sales.SalesPersonSalesPersonIDSalesPersonID
Sales.SalesTerritoryTerritoryIDTerritoryID

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

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