Hi again and sorry when this Posting notreally required. Few days ago i posted following problem, a testcase was required and I attached a testcase in my answer. Now i'm not sure if the testcase reciving the MaillingList, so i send the testcase again. Should be the testcase already arrived the MaillingList, a Admin delete this message please.
Markus ================================================================================= markusge Thu, 08 Mar 2012 05:39:31 -0800 Hi, I have a problem with a Select which subtract two Sum-Values. Normally the correct value of my Select should be 0 but when ich run my Select Sqlite bring back as Result 9.09494 This is my Select: select kto,sum(neg-pos) from ( select kto1 kto,sum(betrag) pos,sum(0) neg from buchungen where kto1 =3020 group by kto1 union select kto2 kto,sum(0) pos, sum(betrag) neg from buchungen where kto2 =3020 group by kto2 ) group by kto; If I Only Run the inner Select select kto1 kto,sum(betrag) pos,sum(0) neg from buchungen where kto1 =3020 group by kto1 union select kto2 kto,sum(0) pos, sum(betrag) neg from buchungen where kto2 =3020 group by kto2 Sqlite give me the correct values 3020| 0 |7154.79 3020| 7154.79 |0 ___________________________________________________________ Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android. https://produkte.web.de/freemail_mobile_startseite/
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users