MySQL Forums
Forum List  »  Turkish

sum ile toplanan iki alanın eksi bakiyesini alma
Posted by: ahmet necati
Date: December 23, 2008 06:10PM

merhaba,
sum ile 2 alanı birbirinden cıkardıgımda sonucun toplamını alıyorum ve genel yekunu elde edıyorum fakat benım ıstedıgım sum ile ıkı alanı bırbırınden cıkardıgımda sadece eksı sonucu veren alanların toplanması

ornegın
=============
a b
== ==== =====
sum( 50 - 70 ) = -20
sum( 20 - 10 ) = 10
sum( 80 - 150 ) = -70
genel yekun = 80
eksi yekun = -90 ***** eksi yekun ve artık yekun alanlarını
artı yekun = 10 ***** nasıl elde edebılırım tek sorgu ıcınde

sımdıden tesekkurler

Options: ReplyQuote


Subject
Views
Written By
Posted
sum ile toplanan iki alanın eksi bakiyesini alma
10006
December 23, 2008 06:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.