Editing Sales.SalesTerritory (table)

Jump to: navigation, search

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"
|- valign="top"
+
|-
 
| '''Table
 
| '''Table
 
| Sales.SalesTerritory
 
| Sales.SalesTerritory
|- valign="top"
+
|-
| '''Description
 
| Sales territory lookup table.
 
 
|}
 
|}
  
=== Columns ===
+
 
 
{| 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
| '''Description
+
| '''PK
 
+
| '''Index
|- valign="top"
+
 +
|-
 
| TerritoryID
 
| TerritoryID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for SalesTerritory records.
+
| PK_SalesTerritory_TerritoryID
|- valign="top"
+
|
 +
|-
 
| Name
 
| Name
 
| dbo.Name
 
| dbo.Name
 
| not null
 
| not null
 
|  
 
|  
| Sales territory description
+
|  
|- valign="top"
+
| AK_SalesTerritory_Name
 +
|-
 
| CountryRegionCode
 
| CountryRegionCode
 
| nvarchar(3)
 
| nvarchar(3)
 
| not null
 
| not null
 
|  
 
|  
| ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
+
|  
|- valign="top"
+
|
 +
|-
 
| Group
 
| Group
 
| nvarchar(50)
 
| nvarchar(50)
 
| not null
 
| not null
 
|  
 
|  
| Geographic area to which the sales territory belong.
+
|  
|- valign="top"
+
|
 +
|-
 
| SalesYTD
 
| SalesYTD
 
| money
 
| money
 
| not null
 
| not null
 
| ((0.00))
 
| ((0.00))
| Sales in the territory year to date.
+
|  
|- valign="top"
+
|
 +
|-
 
| SalesLastYear
 
| SalesLastYear
 
| money
 
| money
 
| not null
 
| not null
 
| ((0.00))
 
| ((0.00))
| Sales in the territory the previous year.
+
|  
|- valign="top"
+
|
 +
|-
 
| CostYTD
 
| CostYTD
 
| money
 
| money
 
| not null
 
| not null
 
| ((0.00))
 
| ((0.00))
| Business costs in the territory year to date.
+
|  
|- valign="top"
+
|
 +
|-
 
| CostLastYear
 
| CostLastYear
 
| money
 
| money
 
| not null
 
| not null
 
| ((0.00))
 
| ((0.00))
| 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.
+
|  
|- valign="top"
+
| AK_SalesTerritory_rowguid
 +
|-
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time the record was last updated.
+
|  
|}
+
|  
 
 
=== Primary Key ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Primary Key
 
| '''Columns
 
|- valign="top"
 
| PK_SalesTerritory_TerritoryID
 
| TerritoryID
 
|}
 
 
 
=== Indexes ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Index
 
| '''Type
 
| '''Columns
 
 
 
|- valign="top"
 
| AK_SalesTerritory_Name
 
| Unique
 
| Name
 
|- valign="top"
 
| AK_SalesTerritory_rowguid
 
| Unique
 
| rowguid
 
 
|}
 
|}
  
=== Check Constraints ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Check Constraint
 
| '''Expression
 
| '''Description
 
  
|- valign="top"
 
| CK_SalesTerritory_CostLastYear
 
| ([CostLastYear]>=(0.00))
 
| Check constraint [CostLastYear] >= (0.00)
 
|- valign="top"
 
| CK_SalesTerritory_CostYTD
 
| ([CostYTD]>=(0.00))
 
| Check constraint [CostYTD] >= (0.00)
 
|- valign="top"
 
| CK_SalesTerritory_SalesLastYear
 
| ([SalesLastYear]>=(0.00))
 
| Check constraint [SalesLastYear] >= (0.00)
 
|- valign="top"
 
| CK_SalesTerritory_SalesYTD
 
| ([SalesYTD]>=(0.00))
 
| Check constraint [SalesYTD] >= (0.00)
 
|}
 
  
=== Detail Tables ===
 
 
{| 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 139: Line 97:
 
| '''Column
 
| '''Column
 
| '''Referencing Column
 
| '''Referencing Column
 
+
|- valign="top"
+
|-
 
| [[Sales.Customer_(table)|Sales.Customer]]
 
| [[Sales.Customer_(table)|Sales.Customer]]
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
|- valign="top"
+
|-
 
| [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]]
 
| [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]]
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
|- valign="top"
+
|-
 
| [[Sales.SalesPerson_(table)|Sales.SalesPerson]]
 
| [[Sales.SalesPerson_(table)|Sales.SalesPerson]]
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
|- valign="top"
+
|-
 
| [[Sales.SalesTerritoryHistory_(table)|Sales.SalesTerritoryHistory]]
 
| [[Sales.SalesTerritoryHistory_(table)|Sales.SalesTerritoryHistory]]
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
|- valign="top"
+
|-
 
| [[Person.StateProvince_(table)|Person.StateProvince]]
 
| [[Person.StateProvince_(table)|Person.StateProvince]]
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 
| TerritoryID
 
|}
 
|}
 
=== References ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Dependency Type
 
| '''Object Type
 
| '''Referenced Object
 
 
|- valign="top"
 
| Data Type
 
| Type
 
| [[dbo.Name_(type)|dbo.Name]]
 
 
|- valign="top"
 
| Schema
 
| Schema
 
| [[Sales_(schema)|Sales]]
 
 
|}
 
 
=== Dependencies ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Reference Type
 
| '''Object Type
 
| '''Referencing Object
 
 
| '''Child Type
 
| '''Child Object
 
 
|- valign="top"
 
| Select
 
| View
 
| [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]]
 
 
|
 
|
 
|- valign="top"
 
| Select
 
| View
 
| [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]]
 
 
|
 
|
 
|- valign="top"
 
| Update
 
| Table
 
| [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]]
 
 
| Trigger
 
| uSalesOrderHeader
 
|}
 
 
 
 
== wikivalues ==
 
== wikivalues ==
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|- valign="top"
+
|-
 
| '''Table Values
 
| '''Table Values
 
| Sales.SalesTerritory
 
| Sales.SalesTerritory
 +
|-
 
|}
 
|}
  
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
  
 +
{| border="1" cellpadding="5" cellspacing="0"  style="border-collapse:collapse"
 +
|- style="background:silver"
 
| '''TerritoryID
 
| '''TerritoryID
 
| '''Name
 
| '''Name
 
| '''CountryRegionCode
 
| '''CountryRegionCode
 
| '''Group
 
| '''Group
|- valign="top"
+
|-  
 
+
| 1
| 1
+
| Northwest
| Northwest
+
| US
| US
+
| North America
| North America
+
|-  
|- valign="top"
+
| 2
 
+
| Northeast
| 2
+
| US
| Northeast
+
| North America
| US
+
|-  
| North America
+
| 3
|- valign="top"
+
| Central
 
+
| US
| 3
+
| North America
| Central
+
|-  
| US
+
| 4
| North America
+
| Southwest
|- valign="top"
+
| US
 
+
| North America
| 4
+
|-  
| Southwest
+
| 5
| US
+
| Southeast
| North America
+
| US
|- valign="top"
+
| North America
 
+
|-  
| 5
+
| 6
| Southeast
+
| Canada
| US
+
| CA
| North America
+
| North America
|- valign="top"
+
|-  
 
+
| 7
| 6
+
| France
| Canada
+
| FR
| CA
+
| Europe
| North America
+
|-  
|- valign="top"
+
| 8
 
+
| Germany
| 7
+
| DE
| France
+
| Europe
| FR
+
|-  
| Europe
+
| 9
|- valign="top"
+
| Australia
 
+
| AU
| 8
+
| Pacific
| Germany
+
|-  
| DE
+
| 10
| Europe
+
| United Kingdom
|- valign="top"
+
| GB
 
+
| Europe
| 9
 
| Australia
 
| AU
 
| Pacific
 
|- valign="top"
 
 
 
| 10
 
| United Kingdom
 
| GB
 
| Europe
 
 
|}
 
|}
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 299: Line 193:
 
| Sales.SalesTerritory
 
| Sales.SalesTerritory
 
|- valign="top"
 
|- valign="top"
 +
 
| '''Description
 
| '''Description
 
| Sales territory lookup table.
 
| Sales territory lookup table.
 
|-
 
|-
 +
 
|}
 
|}
  

Please note that all contributions to dbscript Online Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Project:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)