lundi 26 janvier 2015

What is the method to get a REAL from SUM using ORMLite

I have various double values in my database. To get the sum of them all I am using


relvantDao.queryRawValue("SELECT SUM(productPrice * productQuantity) FROM cart");


Problem is that this only returns a long value, hence the decimal points are lost. How can I get the REAL sum of these values?


Aucun commentaire:

Enregistrer un commentaire