Difference between revisions of "Sales.SalesTerritory (table)"

From dbscript Online Help
Jump to: navigation, search
Line 186: Line 186:
 
| Europe
 
| Europe
 
|}
 
|}
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 208: Line 207:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''Description / PK / Index
| '''PK / Index
 
 
 
|-
+
|- valign="top"
 
| TerritoryID
 
| TerritoryID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for SalesTerritory records.
+
| Primary key for SalesTerritory records.PK_SalesTerritory_TerritoryID
| PK_SalesTerritory_TerritoryID
+
|- valign="top"
|-
 
 
| Name
 
| Name
 
| Name
 
| Name
 
| not null
 
| not null
 
|  
 
|  
| Sales territory description
+
| Sales territory descriptionAK_SalesTerritory_Name
| AK_SalesTerritory_Name
+
|- valign="top"
|-
 
 
| CountryRegionCode
 
| CountryRegionCode
 
| nvarchar(3)
 
| nvarchar(3)
Line 231: Line 227:
 
|  
 
|  
 
| ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.  
 
| ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.  
|
+
|- valign="top"
|-
 
 
| Group
 
| Group
 
| nvarchar(50)
 
| nvarchar(50)
Line 238: Line 233:
 
|  
 
|  
 
| Geographic area to which the sales territory belong.
 
| Geographic area to which the sales territory belong.
|
+
|- valign="top"
|-
 
 
| SalesYTD
 
| SalesYTD
 
| money
 
| money
Line 245: Line 239:
 
| (0.00)
 
| (0.00)
 
| Sales in the territory year to date.
 
| Sales in the territory year to date.
|
+
|- valign="top"
|-
 
 
| SalesLastYear
 
| SalesLastYear
 
| money
 
| money
Line 252: Line 245:
 
| (0.00)
 
| (0.00)
 
| Sales in the territory the previous year.
 
| Sales in the territory the previous year.
|
+
|- valign="top"
|-
 
 
| CostYTD
 
| CostYTD
 
| money
 
| money
Line 259: Line 251:
 
| (0.00)
 
| (0.00)
 
| Business costs in the territory year to date.
 
| Business costs in the territory year to date.
|
+
|- valign="top"
|-
 
 
| CostLastYear
 
| CostLastYear
 
| money
 
| money
Line 266: Line 257:
 
| (0.00)
 
| (0.00)
 
| Business costs in the territory the previous year.
 
| Business costs in the territory the previous year.
|
+
|- 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_SalesTerritory_rowguid
| AK_SalesTerritory_rowguid
+
|- valign="top"
|-
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
Line 280: Line 269:
 
| (GETDATE())
 
| (GETDATE())
 
| Date and time the record was last updated.
 
| Date and time the record was last updated.
|
 
 
|}
 
|}
  
Line 311: Line 299:
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 +
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Referenced Object
 +
| '''Object Type
 +
| '''Dependency Type
 +
 +
|-
 +
| [[dbo.Name_(type)|dbo.Name]]
 +
| Type
 +
| Data Type
 +
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Referencing Object
 +
| '''Object Type
 +
| '''Reference Type
 +
 +
|-
 +
| [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]]
 +
| View
 +
| Select
 +
|-
 +
| [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]]
 +
| View
 +
| Select
 +
|-
 +
| [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]]
 +
| Table
 +
| Update
 
|}
 
|}

Revision as of 23:58, 26 November 2009

wikibot

Table Sales.SalesTerritory


Column Data Type Nullable Default PK Index
TerritoryID int not null PK_SalesTerritory_TerritoryID
Name dbo.Name not null AK_SalesTerritory_Name
CountryRegionCode nvarchar(3) not null
Group nvarchar(50) not null
SalesYTD money not null ((0.00))
SalesLastYear money not null ((0.00))
CostYTD money not null ((0.00))
CostLastYear money not null ((0.00))
rowguid uniqueidentifier not null (newid()) AK_SalesTerritory_rowguid
ModifiedDate datetime not null (getdate())


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

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 descriptionAK_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


Referenced Object Object Type Dependency Type
dbo.Name Type Data Type


Referencing Object Object Type Reference Type
Sales.vSalesPerson View Select
Sales.vSalesPersonSalesByFiscalYears View Select
Sales.SalesOrderHeader Table Update