Guest User

Untitled

a guest
Dec 18th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. CREATE TABLE #temptable ( [AccountNo] bigint, [Month] int,
  2. [PaymentCycle] int, [OpeningBal] decimal(2,2), [Issue] decimal(13,2),
  3. [Collections] decimal(38,2), [Rebates] decimal(38,2), [ClosingBal]
  4. decimal(38,2) )
  5.  
  6. INSERT INTO #temptable
  7. VALUES
  8. ( 1, 201703, 0, 0.00, 100.00, 0.00, 0.00, 100.00 ),
  9. ( 1, 201704, 1, NULL, 0.00, -31.60, 0.00, NULL ),
  10. ( 1, 201705, 2, NULL, 0.00, 0.00, 0.00, NULL ),
  11. ( 1, 201706, 3, NULL, 0.00, 0.00, 0.00, NULL ),
  12. ( 1, 201707, 4, NULL, 0.00, -60.00, 0.00, NULL ),
  13. ( 1, 201708, 5, NULL, 0.00, -78.00, 0.00, NULL ),
  14. ( 1, 201709, 6, NULL, 0.00, 0.00, 0.00, NULL ),
  15. ( 1, 201710, 7, NULL, 0.00, 0.00, 0.00, NULL ),
  16. ( 1, 201711, 8, NULL, 0.00, 0.00, 0.00, NULL )
  17.  
  18. OpeningBal + Revenue + Issue + Collections + Rebates
Add Comment
Please, Sign In to add comment