Difference between revisions of "Sales.SalesPerson (table)"
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.SalesPerson | | Sales.SalesPerson | ||
Line 8: | Line 8: | ||
| '''Description | | '''Description | ||
| Sales representative current information. | | Sales representative current information. | ||
− | |||
|} | |} | ||
− | |||
=== Columns === | === Columns === | ||
Line 20: | Line 18: | ||
| '''Default | | '''Default | ||
| '''Description | | '''Description | ||
− | + | ||
|- valign="top" | |- valign="top" | ||
| SalesPersonID | | SalesPersonID | ||
Line 82: | Line 80: | ||
| '''Primary Key | | '''Primary Key | ||
| '''Columns | | '''Columns | ||
− | |- | + | |- valign="top" |
| PK_SalesPerson_SalesPersonID | | PK_SalesPerson_SalesPersonID | ||
| SalesPersonID | | SalesPersonID | ||
Line 93: | Line 91: | ||
| '''Type | | '''Type | ||
| '''Columns | | '''Columns | ||
− | + | ||
− | |- | + | |- valign="top" |
| AK_SalesPerson_rowguid | | AK_SalesPerson_rowguid | ||
| Unique | | Unique | ||
Line 106: | Line 104: | ||
| '''Expression | | '''Expression | ||
| '''Description | | '''Description | ||
− | + | ||
− | |- | + | |- valign="top" |
| CK_SalesPerson_Bonus | | CK_SalesPerson_Bonus | ||
| ([Bonus]>=(0.00)) | | ([Bonus]>=(0.00)) | ||
| Check constraint [Bonus] >= (0.00) | | Check constraint [Bonus] >= (0.00) | ||
− | |- | + | |- valign="top" |
| CK_SalesPerson_CommissionPct | | CK_SalesPerson_CommissionPct | ||
| ([CommissionPct]>=(0.00)) | | ([CommissionPct]>=(0.00)) | ||
| Check constraint [CommissionPct] >= (0.00) | | Check constraint [CommissionPct] >= (0.00) | ||
− | |- | + | |- valign="top" |
| CK_SalesPerson_SalesLastYear | | CK_SalesPerson_SalesLastYear | ||
| ([SalesLastYear]>=(0.00)) | | ([SalesLastYear]>=(0.00)) | ||
| Check constraint [SalesLastYear] >= (0.00) | | Check constraint [SalesLastYear] >= (0.00) | ||
− | |- | + | |- valign="top" |
| CK_SalesPerson_SalesQuota | | CK_SalesPerson_SalesQuota | ||
| ([SalesQuota]>(0.00)) | | ([SalesQuota]>(0.00)) | ||
| Check constraint [SalesQuota] > (0.00) | | Check constraint [SalesQuota] > (0.00) | ||
− | |- | + | |- valign="top" |
| CK_SalesPerson_SalesYTD | | CK_SalesPerson_SalesYTD | ||
| ([SalesYTD]>=(0.00)) | | ([SalesYTD]>=(0.00)) | ||
Line 135: | Line 133: | ||
| '''Column | | '''Column | ||
| '''Referenced Column | | '''Referenced Column | ||
− | + | ||
− | |- | + | |- valign="top" |
| [[HumanResources.Employee_(table)|HumanResources.Employee]] | | [[HumanResources.Employee_(table)|HumanResources.Employee]] | ||
| SalesPersonID | | SalesPersonID | ||
| EmployeeID | | EmployeeID | ||
− | |- | + | |- valign="top" |
| [[Sales.SalesTerritory_(table)|Sales.SalesTerritory]] | | [[Sales.SalesTerritory_(table)|Sales.SalesTerritory]] | ||
| TerritoryID | | TerritoryID | ||
Line 152: | Line 150: | ||
| '''Column | | '''Column | ||
| '''Referencing Column | | '''Referencing Column | ||
− | + | ||
− | |- | + | |- valign="top" |
| [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | ||
| SalesPersonID | | SalesPersonID | ||
| SalesPersonID | | SalesPersonID | ||
− | |- | + | |- valign="top" |
| [[Sales.SalesPersonQuotaHistory_(table)|Sales.SalesPersonQuotaHistory]] | | [[Sales.SalesPersonQuotaHistory_(table)|Sales.SalesPersonQuotaHistory]] | ||
| SalesPersonID | | SalesPersonID | ||
| SalesPersonID | | SalesPersonID | ||
− | |- | + | |- valign="top" |
| [[Sales.SalesTerritoryHistory_(table)|Sales.SalesTerritoryHistory]] | | [[Sales.SalesTerritoryHistory_(table)|Sales.SalesTerritoryHistory]] | ||
| SalesPersonID | | SalesPersonID | ||
| SalesPersonID | | SalesPersonID | ||
− | |- | + | |- valign="top" |
| [[Sales.Store_(table)|Sales.Store]] | | [[Sales.Store_(table)|Sales.Store]] | ||
| SalesPersonID | | SalesPersonID | ||
Line 178: | Line 176: | ||
| '''Referenced Object | | '''Referenced Object | ||
− | |- | + | |- valign="top" |
| Schema | | Schema | ||
| Schema | | Schema | ||
Line 195: | Line 193: | ||
| '''Child Object | | '''Child Object | ||
− | |- | + | |- valign="top" |
| Select | | Select | ||
| View | | View | ||
Line 202: | Line 200: | ||
| | | | ||
| | | | ||
− | |- | + | |- valign="top" |
| Select | | Select | ||
| View | | View | ||
Line 209: | Line 207: | ||
| | | | ||
| | | | ||
− | |- | + | |- valign="top" |
| Update | | Update | ||
| Table | | Table |
Latest revision as of 23:17, 23 June 2010
Contents
wikibot[edit]
Table | Sales.SalesPerson |
Description | Sales representative current information. |
Columns[edit]
Column | Data Type | Nullable | Default | Description |
SalesPersonID | int | not null | Primary key for SalesPerson records. | |
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. |
ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated. |
Primary Key[edit]
Primary Key | Columns |
PK_SalesPerson_SalesPersonID | SalesPersonID |
Indexes[edit]
Index | Type | Columns |
AK_SalesPerson_rowguid | Unique | rowguid |
Check Constraints[edit]
Check Constraint | Expression | Description |
CK_SalesPerson_Bonus | ([Bonus]>=(0.00)) | Check constraint [Bonus] >= (0.00) |
CK_SalesPerson_CommissionPct | ([CommissionPct]>=(0.00)) | Check constraint [CommissionPct] >= (0.00) |
CK_SalesPerson_SalesLastYear | ([SalesLastYear]>=(0.00)) | Check constraint [SalesLastYear] >= (0.00) |
CK_SalesPerson_SalesQuota | ([SalesQuota]>(0.00)) | Check constraint [SalesQuota] > (0.00) |
CK_SalesPerson_SalesYTD | ([SalesYTD]>=(0.00)) | Check constraint [SalesYTD] >= (0.00) |
Foreign Keys[edit]
Relation | Column | Referenced Column |
HumanResources.Employee | SalesPersonID | EmployeeID |
Sales.SalesTerritory | TerritoryID | TerritoryID |
Detail Tables[edit]
Detail Table | Column | Referencing Column |
Sales.SalesOrderHeader | SalesPersonID | SalesPersonID |
Sales.SalesPersonQuotaHistory | SalesPersonID | SalesPersonID |
Sales.SalesTerritoryHistory | SalesPersonID | SalesPersonID |
Sales.Store | SalesPersonID | SalesPersonID |
References[edit]
Dependency Type | Object Type | Referenced Object |
Schema | Schema | Sales |
Dependencies[edit]
Reference Type | Object Type | Referencing Object | Child Type | Child Object |
Select | View | Sales.vSalesPerson | ||
Select | View | Sales.vSalesPersonSalesByFiscalYears | ||
Update | Table | Sales.SalesOrderHeader | Trigger | uSalesOrderHeader |
automatically generated[edit]
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 |
Dependency Type | Object Type | Referenced Object |
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 |