Editing Sales.SalesTerritoryHistory (table)
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
− | |- | + | |- |
| '''Table | | '''Table | ||
| Sales.SalesTerritoryHistory | | Sales.SalesTerritoryHistory | ||
− | |- | + | |- |
− | |||
− | |||
|} | |} | ||
− | + | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 17: | Line 15: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | ''' | + | | '''PK |
− | + | | '''Index | |
− | |- | + | |
+ | |- | ||
| SalesPersonID | | SalesPersonID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID |
− | |- | + | | |
+ | |- | ||
| TerritoryID | | TerritoryID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID |
− | |- | + | | |
+ | |- | ||
| StartDate | | StartDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| | | | ||
− | | | + | | PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID |
− | |- | + | | |
+ | |- | ||
| EndDate | | EndDate | ||
| datetime | | datetime | ||
| null | | null | ||
| | | | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| rowguid | | rowguid | ||
| uniqueidentifier | | uniqueidentifier | ||
| not null | | not null | ||
| (newid()) | | (newid()) | ||
− | | | + | | |
− | |- | + | | AK_SalesTerritoryHistory_rowguid |
+ | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
− | | | + | | |
+ | | | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 99: | Line 69: | ||
| '''Column | | '''Column | ||
| '''Referenced Column | | '''Referenced Column | ||
− | + | ||
− | |- | + | |- |
| [[Sales.SalesPerson_(table)|Sales.SalesPerson]] | | [[Sales.SalesPerson_(table)|Sales.SalesPerson]] | ||
| SalesPersonID | | SalesPersonID | ||
| SalesPersonID | | SalesPersonID | ||
− | |- | + | |- |
| [[Sales.SalesTerritory_(table)|Sales.SalesTerritory]] | | [[Sales.SalesTerritory_(table)|Sales.SalesTerritory]] | ||
| TerritoryID | | TerritoryID | ||
| TerritoryID | | TerritoryID | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== automatically generated == | == automatically generated == | ||
Line 131: | Line 86: | ||
| '''Table | | '''Table | ||
| Sales.SalesTerritoryHistory | | Sales.SalesTerritoryHistory | ||
− | |- | + | |- |
+ | |||
| '''Description | | '''Description | ||
| Sales representative transfers to other sales territories. | | Sales representative transfers to other sales territories. | ||
|- | |- | ||
+ | |||
|} | |} | ||
Line 144: | Line 101: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | '''Description | + | | '''Description |
+ | | '''PK / Index | ||
− | |- | + | |- |
| SalesPersonID | | SalesPersonID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | Primary key for SalesTerritoryHistory records. | + | | Primary key for SalesTerritoryHistory records. |
− | |- | + | | PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID |
+ | |- | ||
| 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 |
+ | |- | ||
| 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 |
+ | |- | ||
| EndDate | | EndDate | ||
| datetime | | datetime | ||
| null | | null | ||
| | | | ||
− | | Date the sales representative left work in the territory. | + | | Date the sales representative left work in the territory. |
− | |- | + | | |
+ | |- | ||
| 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 |
+ | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
− | | Date and time the record was last updated. | + | | Date and time the record was last updated. |
+ | | | ||
|} | |} | ||
Line 200: | Line 164: | ||
| TerritoryID | | TerritoryID | ||
| TerritoryID | | TerritoryID | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |