Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE #temptable ( [AccountNo] bigint, [Month] int,
- [PaymentCycle] int, [OpeningBal] decimal(2,2), [Issue] decimal(13,2),
- [Collections] decimal(38,2), [Rebates] decimal(38,2), [ClosingBal]
- decimal(38,2) )
- INSERT INTO #temptable
- VALUES
- ( 1, 201703, 0, 0.00, 100.00, 0.00, 0.00, 100.00 ),
- ( 1, 201704, 1, NULL, 0.00, -31.60, 0.00, NULL ),
- ( 1, 201705, 2, NULL, 0.00, 0.00, 0.00, NULL ),
- ( 1, 201706, 3, NULL, 0.00, 0.00, 0.00, NULL ),
- ( 1, 201707, 4, NULL, 0.00, -60.00, 0.00, NULL ),
- ( 1, 201708, 5, NULL, 0.00, -78.00, 0.00, NULL ),
- ( 1, 201709, 6, NULL, 0.00, 0.00, 0.00, NULL ),
- ( 1, 201710, 7, NULL, 0.00, 0.00, 0.00, NULL ),
- ( 1, 201711, 8, NULL, 0.00, 0.00, 0.00, NULL )
- OpeningBal + Revenue + Issue + Collections + Rebates
Add Comment
Please, Sign In to add comment