B4J Question how to sum all the values of a map in b4x

juangtju

Member
Good friends, I'm trying to add the values I have from a map that I bring from a mysql query with jrcd2 but I still can't find the function, if someone can help me I would be grateful
 

juangtju

Member
Thanks Erel, however the problem I have is that the map that I need to add is the one that brings me all the information from the database and has many values, I think the most logical thing would be that after the JRDC brings me the map complete, I made a separate one only with the values that I want sum, is it correct? since I am trying to sum the values from the database but it gives me error

sql.sumvuelto = SELECT SUM(vuelto) * FROM osi.vuelto WHERE `codiclie` LIKE ?

If I do it in another program that handles the queries, it does handle it for me, but I don't know if the JRDC can handle those summation queries.
 
Upvote 0

juangtju

Member
It is a way of adding it directly from the ide, however I managed to bring the sum with a query, thank you erel, for such a prompt response ?

sql.sumvuelto = SELECT SUM(vuelto) as total FROM osi.vuelto WHERE `codiclie` LIKE ? AND `dateused` IS NULL
this is the query what i use for this purpose
 
Upvote 0
Top