ScrewTurn Wiki

Edit

wikibot

TableSales.SalesPerson
DescriptionSales representative current information.

Edit

Columns

ColumnData TypeNullableDefaultDescription
SalesPersonIDintnot null Primary key for SalesPerson records.
TerritoryIDintnull Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.
SalesQuotamoneynull Projected yearly sales.
Bonusmoneynot null((0.00))Bonus due if quota is met.
CommissionPctsmallmoneynot null((0.00))Commision percent received per sale.
SalesYTDmoneynot null((0.00))Sales total year to date.
SalesLastYearmoneynot null((0.00))Sales total of previous year.
rowguiduniqueidentifiernot null(newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_SalesPerson_SalesPersonIDSalesPersonID

Edit

Indexes

IndexTypeColumns
AK_SalesPerson_rowguidUniquerowguid

Edit

Check Constraints

Check ConstraintExpressionDescription
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)

Edit

Foreign Keys

RelationColumnReferenced Column
HumanResources.EmployeeSalesPersonIDEmployeeID
Sales.SalesTerritoryTerritoryIDTerritoryID

Edit

Detail Tables

Detail TableColumnReferencing Column
Sales.SalesOrderHeaderSalesPersonIDSalesPersonID
Sales.SalesPersonQuotaHistorySalesPersonIDSalesPersonID
Sales.SalesTerritoryHistorySalesPersonIDSalesPersonID
Sales.StoreSalesPersonIDSalesPersonID

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

Edit

Dependencies

Reference TypeObject TypeReferencing ObjectChild TypeChild Object
SelectViewSales.vSalesPerson  
SelectViewSales.vSalesPersonSalesByFiscalYears  
UpdateTableSales.SalesOrderHeaderTriggeruSalesOrderHeader

Edit

automatically generated

TableSales.SalesPerson
DescriptionSales representative current information.

ColumnData TypeNullableDefaultDescription / PK / Index
SalesPersonIDintnot null Primary key for SalesPerson records.
PK_SalesPerson_SalesPersonID
TerritoryIDintnull Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.
SalesQuotamoneynull Projected yearly sales.
Bonusmoneynot null(0.00)Bonus due if quota is met.
CommissionPctsmallmoneynot null(0.00)Commision percent received per sale.
SalesYTDmoneynot null(0.00)Sales total year to date.
SalesLastYearmoneynot null(0.00)Sales total of previous year.
rowguiduniqueidentifiernot null(NEWID())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_SalesPerson_rowguid
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
HumanResources.EmployeeSalesPersonIDEmployeeID
Sales.SalesTerritoryTerritoryIDTerritoryID

Detail TableColumnReferencing Column
Sales.SalesOrderHeaderSalesPersonIDSalesPersonID
Sales.SalesPersonQuotaHistorySalesPersonIDSalesPersonID
Sales.SalesTerritoryHistorySalesPersonIDSalesPersonID
Sales.StoreSalesPersonIDSalesPersonID

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

Reference TypeObject TypeReferencing ObjectChild TypeChild Object
SelectViewSales.vSalesPerson
SelectViewSales.vSalesPersonSalesByFiscalYears
UpdateTableSales.SalesOrderHeaderTriggeruSalesOrderHeader

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.