This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET NOCOUNT ON; | |
SELECT | |
ProductID | |
,ModifiedDate | |
,UnitPrice | |
,SUM(UnitPrice) OVER ( | |
PARTITION BY ModifiedDate | |
ORDER BY ProductID, ModifiedDate, SalesOrderID | |
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) ASModifiedDateBalance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET NOCOUNT ON; | |
DECLARE @Balances AS TABLE | |
( | |
ProductId INT | |
,ModifiedDate DATETIME | |
,UnitPrice MONEY | |
,ModifiedDateBalance MONEY | |
,ProductIdBalance MONEY | |
,ModifiedDateTotal MONEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ValidationChecker(): | |
def __init__(self, validationContext, validationsFile, validationsModule): | |
self.Context = validationContext | |
self.Errors = {} | |
self.__validationsTree = self.__LoadFile(validationsFile) | |
self.__module = __import__(validationsModule) | |
def __LoadFile(self, validationsFile): | |
base = '' |