i have a datagridview on my application, i need to multiply two field from database, sum the result then show it to datagridview.
maybe something like this :
i don't know how to use SINGLE QUERY to make it happen.
i know how to use
SUM(field1 * field2)
but it will give me the sum result without showing the multiply result.
so far i get this error : "operator + is not defined for dbNull", i multiply
(field1 * field2)from query then sum the multiply result from datagridview.
or should i make 2 query? multiply the field
(field1 * field2)then
sum(field1 * field2)any suggestion will be appreciated.
thanks in advance.
This post has been edited by artemix22: 26 July 2013 - 06:23 AM