Sum of Multi Column in same Query

ootkhopdi

Registered User.
Local time
Tomorrow, 04:42
Joined
Oct 17, 2013
Messages
181
Hi All

i create an query with expr1 as field1, expr 2 as field 2, expr 3 as field3
now i want to expr4 as field4 which is sum of field 1,field2 and field3
but when i put Expr4:Field1+Field2+field3 it gives result as concatenate of field values

as example

filed 1 field 2 field 3 field 4
01 03 404 0103404

while i want to sum of all field 1 to field 3 as 408

what is the problem ..

can some one give me solution...
with functionalty of formula

thanks in advance
 
Expr4:Field1+Field2+field3
is correct IF, the values are numeric. If you have them as string, they will concat.

try Expr4: cLng(Field1)+cLng(Field2)+cLng(field3)
 
or

Expr4: CDbl(Field1)+CDbl(Field2)+CDbl(field3)

if the values are not always integer values.
 
Thanks Ranman 256 and sneuberg

for helping solutions
it works and solve my problem
thanks once again
 

Users who are viewing this thread

Back
Top Bottom