I would like to clean up my code and avoid having to make changes in multiple locations. This is my exact scenerio:
Just assume a ton of logic statements in here….
END AS ContribToComm,
Just assume a ton of logic statements in here THAT ARE ALL THE EXACT SAME AS ABOVE !
OVER (PARTITION BY L1.PayTo,MonthValue ORDER BY L1.PayTo, IssueDate, CheckNum) AS RunningTotal
How would you re-write this to avoid duplicating logic?