Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks
CREATE PROCEDURE spx @BeginDate DATETIME @EndDate DATETIME AS SELECT StoreNumber, Date, Sales, DateComp, SalesComp, Labor, CashOS, Comment, (Sales-SalesComp)/nullif(SalesComp,0)*100 AS DCompPercent FROM (SELECT T1.StoreNumber, T1.Date, T1.Sales, DateAdd(DAY,-371,T1.Date) AS DateComp, (Select Sum (Sales) FROM Sales WHERE T1.StoreNumber = Sales.StoreNumber and Sales.Date = DateAdd(DAY,-371,T1.Date)) AS SalesComp, T1.Labor, T1.CashOS, T1.Comment FROM Sales AS T1) S Where Date BETWEEN @BeginDate and @EndDate ORDER BY Date DESC, StoreNumber ASC
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.