Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Running Balance

Running Balance

Scheduled Pinned Locked Moved Database
databasehelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paulaziz
    wrote on last edited by
    #1

    I have a table that stores transactions for income and expenditure. the fields of the table is shown below transid, accountcredited, accountdebited, date, amount. Every transaction has double entry; it debits one account and credit another. The accountcredited and accountdebited are linked to accounts table(the fields for accounts table are accid, accountno, balance) The problem is I cannot figure out sql statement generate running balance Thanks in advance

    M B 2 Replies Last reply
    0
    • P paulaziz

      I have a table that stores transactions for income and expenditure. the fields of the table is shown below transid, accountcredited, accountdebited, date, amount. Every transaction has double entry; it debits one account and credit another. The accountcredited and accountdebited are linked to accounts table(the fields for accounts table are accid, accountno, balance) The problem is I cannot figure out sql statement generate running balance Thanks in advance

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Try a search [^] this question has been answered so many times before.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • P paulaziz

        I have a table that stores transactions for income and expenditure. the fields of the table is shown below transid, accountcredited, accountdebited, date, amount. Every transaction has double entry; it debits one account and credit another. The accountcredited and accountdebited are linked to accounts table(the fields for accounts table are accid, accountno, balance) The problem is I cannot figure out sql statement generate running balance Thanks in advance

        B Offline
        B Offline
        Blue_Boy
        wrote on last edited by
        #3

        I guess you have to use SUM and GROUP BY, by the way your question is not enough clear.


        I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups