We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
DECLARE @ACCOUNT VARCHAR(10) DECLARE @YEAR VARCHAR(4) DECLARE @PERIOD VARCHAR SET @ACCOUNT = '90229' SET @YEAR = '2013' SET @PERIOD = '3' SELECT A.ACCOUNT, A.YEAR, A.PERIOD, A.BALANCE, (A.BALANCE + B.BALANCE) YTD_BALANCE FROM BALANCE A LEFT OUTER JOIN ( SELECT A.ACCOUNT, A.YEAR, A.PERIOD, SUM(A.BALANCE) BALANCE FROM BALANCE A WHERE A.ACCOUNT = @ACCOUNT AND A.YEAR = @YEAR AND A.PERIOD = @PERIOD ) B ON B.ACCOUNT = A.ACCOUNT AND B.YEAR = A.YEAR AND B.PERIOD = (A.PERIOD - 1) WHERE A.ACCOUNT = @ACCOUNT AND A.YEAR = @YEAR AND A.PERIOD = @PERIOD
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|oracle database - pl sql code - for connecting to multiple databases from 1 database using database links||30||90|
|Setting Macro in Access to Automate Running an Append at a Certain Time||2||32|
|How to count the days a record spends in a step||21||56|
|MS SQL Server time between records||14||52|