Difference between revisions of "Sales.SalesTerritory (table)"
Line 5: | Line 5: | ||
| '''Table | | '''Table | ||
| Sales.SalesTerritory | | Sales.SalesTerritory | ||
+ | |- valign="top" | ||
+ | | '''Description | ||
+ | | Sales territory lookup table. | ||
|- | |- | ||
|} | |} | ||
Line 15: | Line 18: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | '''PK | + | | '''Description / PK / Index |
− | |||
− | |- | + | |- valign="top" |
| TerritoryID | | TerritoryID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | PK_SalesTerritory_TerritoryID | + | | Primary key for SalesTerritory records.<br />PK_SalesTerritory_TerritoryID |
− | + | |- valign="top" | |
− | |- | ||
| Name | | Name | ||
| dbo.Name | | dbo.Name | ||
| not null | | not null | ||
| | | | ||
− | | | + | | Sales territory description<br />AK_SalesTerritory_Name |
− | + | |- valign="top" | |
− | |- | ||
| CountryRegionCode | | CountryRegionCode | ||
| nvarchar(3) | | nvarchar(3) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. <br /> |
− | + | |- valign="top" | |
− | |- | ||
| Group | | Group | ||
| nvarchar(50) | | nvarchar(50) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | Geographic area to which the sales territory belong.<br /> |
− | + | |- valign="top" | |
− | |- | ||
| SalesYTD | | SalesYTD | ||
| money | | money | ||
| not null | | not null | ||
| ((0.00)) | | ((0.00)) | ||
− | | | + | | Sales in the territory year to date.<br /> |
− | + | |- valign="top" | |
− | |- | ||
| SalesLastYear | | SalesLastYear | ||
| money | | money | ||
| not null | | not null | ||
| ((0.00)) | | ((0.00)) | ||
− | | | + | | Sales in the territory the previous year.<br /> |
− | + | |- valign="top" | |
− | |- | ||
| CostYTD | | CostYTD | ||
| money | | money | ||
| not null | | not null | ||
| ((0.00)) | | ((0.00)) | ||
− | | | + | | Business costs in the territory year to date.<br /> |
− | + | |- valign="top" | |
− | |- | ||
| CostLastYear | | CostLastYear | ||
| money | | money | ||
| not null | | not null | ||
| ((0.00)) | | ((0.00)) | ||
− | | | + | | Business costs in the territory the previous year.<br /> |
− | + | |- 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.<br />AK_SalesTerritory_rowguid |
− | + | |- valign="top" | |
− | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
− | | | + | | Date and time the record was last updated.<br /> |
− | |||
|} | |} | ||
Line 119: | Line 111: | ||
| TerritoryID | | TerritoryID | ||
|} | |} | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Dependency Type | ||
+ | | '''Object Type | ||
+ | | '''Referenced Object | ||
+ | |||
+ | |- | ||
+ | | Data Type | ||
+ | | Type | ||
+ | | [[dbo.Name_(type)|dbo.Name]] | ||
+ | |||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Reference Type | ||
+ | | '''Object Type | ||
+ | | '''Referencing Object | ||
+ | |||
+ | | '''Child Type | ||
+ | | '''Child Object | ||
+ | |||
+ | |- | ||
+ | | Select | ||
+ | | View | ||
+ | | [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]] | ||
+ | |||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | Select | ||
+ | | View | ||
+ | | [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]] | ||
+ | |||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | Update | ||
+ | | Table | ||
+ | | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | ||
+ | |||
+ | | Trigger | ||
+ | | uSalesOrderHeader | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
== wikivalues == | == wikivalues == | ||
Revision as of 22:55, 28 December 2009
wikibot
Table | Sales.SalesTerritory |
Description | Sales territory lookup table. |
Column | Data Type | Nullable | Default | Description / PK / Index |
TerritoryID | int | not null | Primary key for SalesTerritory records. PK_SalesTerritory_TerritoryID | |
Name | dbo.Name | not null | Sales territory description AK_SalesTerritory_Name | |
CountryRegionCode | nvarchar(3) | not null | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. | |
Group | nvarchar(50) | not null | Geographic area to which the sales territory belong. | |
SalesYTD | money | not null | ((0.00)) | Sales in the territory year to date. |
SalesLastYear | money | not null | ((0.00)) | Sales in the territory the previous year. |
CostYTD | money | not null | ((0.00)) | Business costs in the territory year to date. |
CostLastYear | money | not null | ((0.00)) | Business costs in the territory the previous year. |
rowguid | uniqueidentifier | not null | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. AK_SalesTerritory_rowguid |
ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated. |
Detail Table | Column | Referencing Column |
Sales.Customer | TerritoryID | TerritoryID |
Sales.SalesOrderHeader | TerritoryID | TerritoryID |
Sales.SalesPerson | TerritoryID | TerritoryID |
Sales.SalesTerritoryHistory | TerritoryID | TerritoryID |
Person.StateProvince | TerritoryID | TerritoryID |
Dependency Type | Object Type | Referenced Object |
Data Type | Type | dbo.Name |
Reference Type | Object Type | Referencing Object | Child Type | Child Object |
Select | View | Sales.vSalesPerson | ||
Select | View | Sales.vSalesPersonSalesByFiscalYears | ||
Update | Table | Sales.SalesOrderHeader | Trigger | uSalesOrderHeader |
wikivalues
Table Values | Sales.SalesTerritory |
TerritoryID | Name | CountryRegionCode | Group |
1 | Northwest | US | North America |
2 | Northeast | US | North America |
3 | Central | US | North America |
4 | Southwest | US | North America |
5 | Southeast | US | North America |
6 | Canada | CA | North America |
7 | France | FR | Europe |
8 | Germany | DE | Europe |
9 | Australia | AU | Pacific |
10 | United Kingdom | GB | Europe |
automatically generated
Table | Sales.SalesTerritory |
Description | Sales territory lookup table. |
Column | Data Type | Nullable | Default | Description / PK / Index |
TerritoryID | int | not null | Primary key for SalesTerritory records. PK_SalesTerritory_TerritoryID | |
Name | Name | not null | Sales territory description AK_SalesTerritory_Name | |
CountryRegionCode | nvarchar(3) | not null | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. | |
Group | nvarchar(50) | not null | Geographic area to which the sales territory belong. | |
SalesYTD | money | not null | (0.00) | Sales in the territory year to date. |
SalesLastYear | money | not null | (0.00) | Sales in the territory the previous year. |
CostYTD | money | not null | (0.00) | Business costs in the territory year to date. |
CostLastYear | money | not null | (0.00) | Business costs in the territory the previous year. |
rowguid | uniqueidentifier | not null | (NEWID()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. AK_SalesTerritory_rowguid |
ModifiedDate | datetime | not null | (GETDATE()) | Date and time the record was last updated. |
Detail Table | Column | Referencing Column |
Sales.Customer | TerritoryID | TerritoryID |
Sales.SalesOrderHeader | TerritoryID | TerritoryID |
Sales.SalesPerson | TerritoryID | TerritoryID |
Sales.SalesTerritoryHistory | TerritoryID | TerritoryID |
Person.StateProvince | TerritoryID | TerritoryID |
Dependency Type | Object Type | Referenced Object |
Data Type | Type | dbo.Name |
Schema | Schema | Sales |
Reference Type | Object Type | Referencing Object | Child Type | Child Object |
Select | View | Sales.vSalesPerson | ||
Select | View | Sales.vSalesPersonSalesByFiscalYears | ||
Update | Table | Sales.SalesOrderHeader | Trigger | uSalesOrderHeader |