|
|
Home » U++ Library support » U++ SQL » Sql Avg delivers String instead of double
Sql Avg delivers String instead of double [message #43439] |
Wed, 30 July 2014 23:38  |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
Hi,
I noticed in one of my programs that with MySql the Avg() function on a field delivers a String type and not a double type result in response Value.
Here is the sql query I use:
SQL * Select( field1,
Avg(field2), Count(field2),
Avg(field3), Count(field3))
.From(table1);
The DB schema is defined in a .sch file and all fields have sql type INT.
Surprisingly Count() in SQL[2] and SQL[4] delivers an expected numeric type (double) in this case which is converted to int automatically when using Value.
But I get a String in SQL[1] and SQL[3] which should also contain double type Value.
What is the reason for it to have String type instead of double?
Can somebody point me to the code location where SQL[] Value are assigned from DB response?
Regards
Matthias
931b81e7ea53320dccc37375b34b38c3
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun May 11 14:37:49 CEST 2025
Total time taken to generate the page: 0.04002 seconds
|
|
|