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

From dbscript Online Help
Jump to: navigation, search
Line 125: Line 125:
 
| SalesPersonID
 
| SalesPersonID
 
|}
 
|}
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 147: Line 146:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''Description / PK / Index
| '''PK / Index
 
 
 
|-
+
|- valign="top"
 
| SalesPersonID
 
| SalesPersonID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for SalesPerson records.
+
| Primary key for SalesPerson records.PK_SalesPerson_SalesPersonID
| PK_SalesPerson_SalesPersonID
+
|- valign="top"
|-
 
 
| TerritoryID
 
| TerritoryID
 
| int
 
| int
Line 163: Line 160:
 
|  
 
|  
 
| Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.
 
| Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.
|
+
|- valign="top"
|-
 
 
| SalesQuota
 
| SalesQuota
 
| money
 
| money
Line 170: Line 166:
 
|  
 
|  
 
| Projected yearly sales.
 
| Projected yearly sales.
|
+
|- valign="top"
|-
 
 
| Bonus
 
| Bonus
 
| money
 
| money
Line 177: Line 172:
 
| (0.00)
 
| (0.00)
 
| Bonus due if quota is met.
 
| Bonus due if quota is met.
|
+
|- valign="top"
|-
 
 
| CommissionPct
 
| CommissionPct
 
| smallmoney
 
| smallmoney
Line 184: Line 178:
 
| (0.00)
 
| (0.00)
 
| Commision percent received per sale.
 
| Commision percent received per sale.
|
+
|- valign="top"
|-
 
 
| SalesYTD
 
| SalesYTD
 
| money
 
| money
Line 191: Line 184:
 
| (0.00)
 
| (0.00)
 
| Sales total year to date.
 
| Sales total year to date.
|
+
|- valign="top"
|-
 
 
| SalesLastYear
 
| SalesLastYear
 
| money
 
| money
Line 198: Line 190:
 
| (0.00)
 
| (0.00)
 
| Sales total of previous year.
 
| Sales total of 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_SalesPerson_rowguid
| AK_SalesPerson_rowguid
+
|- valign="top"
|-
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
Line 212: Line 202:
 
| (GETDATE())
 
| (GETDATE())
 
| Date and time the record was last updated.
 
| Date and time the record was last updated.
|
 
 
|}
 
|}
  
Line 256: Line 245:
 
| SalesPersonID
 
| SalesPersonID
 
| SalesPersonID
 
| SalesPersonID
 +
|}
 +
 +
 +
{| 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 00:58, 27 November 2009

wikibot

Table Sales.SalesPerson


Column Data Type Nullable Default PK Index
SalesPersonID int not null PK_SalesPerson_SalesPersonID
TerritoryID int null
SalesQuota money null
Bonus money not null ((0.00))
CommissionPct smallmoney not null ((0.00))
SalesYTD money not null ((0.00))
SalesLastYear money not null ((0.00))
rowguid uniqueidentifier not null (newid()) AK_SalesPerson_rowguid
ModifiedDate datetime not null (getdate())


Relation Column Referenced Column
HumanResources.Employee SalesPersonID EmployeeID
Sales.SalesTerritory TerritoryID TerritoryID


Detail Table Column Referencing Column
Sales.SalesOrderHeader SalesPersonID SalesPersonID
Sales.SalesPersonQuotaHistory SalesPersonID SalesPersonID
Sales.SalesTerritoryHistory SalesPersonID SalesPersonID
Sales.Store SalesPersonID SalesPersonID

automatically generated

Table Sales.SalesPerson
Description Sales representative current information.


Column Data Type Nullable Default Description / PK / Index
SalesPersonID int not null Primary key for SalesPerson records.PK_SalesPerson_SalesPersonID
TerritoryID int null Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.
SalesQuota money null Projected yearly sales.
Bonus money not null (0.00) Bonus due if quota is met.
CommissionPct smallmoney not null (0.00) Commision percent received per sale.
SalesYTD money not null (0.00) Sales total year to date.
SalesLastYear money not null (0.00) Sales total of previous year.
rowguid uniqueidentifier not null (NEWID()) ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_SalesPerson_rowguid
ModifiedDate datetime not null (GETDATE()) Date and time the record was last updated.


Relation Column Referenced Column
HumanResources.Employee SalesPersonID EmployeeID
Sales.SalesTerritory TerritoryID TerritoryID


Detail Table Column Referencing Column
Sales.SalesOrderHeader SalesPersonID SalesPersonID
Sales.SalesPersonQuotaHistory SalesPersonID SalesPersonID
Sales.SalesTerritoryHistory SalesPersonID SalesPersonID
Sales.Store SalesPersonID SalesPersonID


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