15,666,902 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View Javascript questions
View C++ questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Anele 'Mashy' Mbanga (Top 6 by date)
Anele 'Mashy' Mbanga
6-May-15 7:03am
View
Great then.. Take care..
Anele 'Mashy' Mbanga
5-May-15 13:23pm
View
Wow, I have checked your example and if it works, then all is good. Remember, there are multiple records for your example that have different ids, or primary keys and to achieve your required output, your procedure above uses a loop for each record. Happy coding... and all the best
Anele 'Mashy' Mbanga
5-May-15 13:03pm
View
Hi again, I think you might have to consider using a trigger with your example within the database itself. I have also found out that you can also perhaps use a self join which I think was what you were trying to achieve. Whilst the example below is not what you want, perhaps its something you can explore for more details.
http://www.mysqltutorial.org/mysql-tips/mysql-compare-calculate-difference-successive-rows/
I will keep on looking for something for you.
Please also update your questions in the future to provide as much details as possible, as usually a process flow is much better to understand what one wants to achieve. Will keep you posted...
Anele 'Mashy' Mbanga
5-May-15 12:32pm
View
The balances calculated here are just for 1 account isnt it?
Anele 'Mashy' Mbanga
5-May-15 10:26am
View
Ohk, I get you. So the "last balance" from your formular above is the balance that is already there? If I understand this correctly, if for example we currently have a credit = 300, a debit = 50 and a balance = 600, you want your result to be 600 + 50 - 300 = 350 right?
Anele 'Mashy' Mbanga
5-May-15 7:51am
View
HiJust for clarity so that I can help you, your "pos" table has only two columns a and b or it has more? I'm trying to understand why your second select statement is "select *" as this selects all fields, why don't you just work with the columns you want?
Show More