Search Engine
Here you can search through the pages of this Namespace, their attachments and the files uploaded to the system.
Note: the results will only display the items you have permissions to read.
This search, performed through 2.14 MB (338 documents, 3448 words), completed in 0.0 seconds and yielded 5 results.
[...] 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. ModifiedDate [...]
[...] 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 Primary Key Columns PK_SalesPerson_SalesPersonID SalesPersonID Indexes Index Type Columns [...]
[...]
(SELECT inserted.[SalesOrderID] FROM inserted);
END;
-- Update the SalesPerson SalesYTD when SubTotal is updated
IF UPDATE([SubTotal])
BEGIN
DECLARE @StartDate datetime,
@EndDate datetime
SET @StartDate = [dbo].[ufnGetAccountingStartDate]();
SET @EndDate = [dbo].[ufnGetAccountingEndDate]();
UPDATE [Sales].[SalesPerson]
SET [Sales].[SalesPerson].[SalesYTD] =
(SELECT SUM([Sales].[SalesOrderHeader].[SubTotal])
FROM [Sales].[SalesOrderHeader] [...]
[...] CreditRating CustomerType UnitPriceDiscount DueDate Bonus CommissionPct SalesLastYear SalesQuota SalesYTD TaxType CostLastYear CostYTD Quantity [...]
[...] cr.[Name]
,[TerritoryName] = st.[Name]
,[TerritoryGroup] = st.[Group]
,s.[SalesQuota]
,s.[SalesYTD]
,s.[SalesLastYear]
FROM [Sales].[SalesPerson] [...]