Difference between revisions of "Sales.SalesTerritoryHistory (table)"
| Line 79: | Line 79: | ||
| TerritoryID | | TerritoryID | ||
|} | |} | ||
| − | |||
== automatically generated == | == automatically generated == | ||
| Line 101: | Line 100: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
| − | | '''Description | + | | '''Description / PK / Index |
| − | |||
| − | |- | + | |- valign="top" |
| SalesPersonID | | SalesPersonID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
| − | | Primary key for SalesTerritoryHistory records. | + | | Primary key for SalesTerritoryHistory records.PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID |
| − | + | |- valign="top" | |
| − | |- | ||
| TerritoryID | | TerritoryID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
| − | | Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID. | + | | Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID.PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID |
| − | + | |- valign="top" | |
| − | |- | ||
| StartDate | | StartDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| | | | ||
| − | | Date the sales representive started work in the territory. | + | | Date the sales representive started work in the territory.PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID |
| − | + | |- valign="top" | |
| − | |- | ||
| EndDate | | EndDate | ||
| datetime | | datetime | ||
| Line 131: | Line 126: | ||
| | | | ||
| Date the sales representative left work in the territory. | | Date the sales representative left work in the territory. | ||
| − | + | |- valign="top" | |
| − | |- | ||
| rowguid | | rowguid | ||
| uniqueidentifier | | uniqueidentifier | ||
| not null | | not null | ||
| (NEWID()) | | (NEWID()) | ||
| − | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_SalesTerritoryHistory_rowguid |
| − | + | |- valign="top" | |
| − | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| Line 145: | Line 138: | ||
| (GETDATE()) | | (GETDATE()) | ||
| Date and time the record was last updated. | | Date and time the record was last updated. | ||
| − | |||
|} | |} | ||
Revision as of 23:58, 26 November 2009
wikibot
| Table | Sales.SalesTerritoryHistory |
| Column | Data Type | Nullable | Default | PK | Index |
| SalesPersonID | int | not null | PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | ||
| TerritoryID | int | not null | PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | ||
| StartDate | datetime | not null | PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | ||
| EndDate | datetime | null | |||
| rowguid | uniqueidentifier | not null | (newid()) | AK_SalesTerritoryHistory_rowguid | |
| ModifiedDate | datetime | not null | (getdate()) |
| Relation | Column | Referenced Column |
| Sales.SalesPerson | SalesPersonID | SalesPersonID |
| Sales.SalesTerritory | TerritoryID | TerritoryID |
automatically generated
| Table | Sales.SalesTerritoryHistory |
| Description | Sales representative transfers to other sales territories. |
| Column | Data Type | Nullable | Default | Description / PK / Index |
| SalesPersonID | int | not null | Primary key for SalesTerritoryHistory records.PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | |
| TerritoryID | int | not null | Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID.PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | |
| StartDate | datetime | not null | Date the sales representive started work in the territory.PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | |
| EndDate | datetime | null | Date the sales representative left work in the territory. | |
| rowguid | uniqueidentifier | not null | (NEWID()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_SalesTerritoryHistory_rowguid |
| ModifiedDate | datetime | not null | (GETDATE()) | Date and time the record was last updated. |
| Relation | Column | Referenced Column |
| Sales.SalesPerson | SalesPersonID | SalesPersonID |
| Sales.SalesTerritory | TerritoryID | TerritoryID |