I cannot use round function in Query of Query. I can cast the number as integer like:
select cast(myValue as integer) finalNumber
where myValue = 65.7, but the result is 65, it should be 66.
It is a work around this issue?
select a static field in your q of q. Then loop through the results and update it using querysetcell and the coldfusion round() function.
No, the integer part of 65.7 is 65, not 66. casting to an integer is not a rounding operation, it's a data-type conversion operation. If you want to do rounding, add 0.5 to the float before converting it to an int.
Here is my code solution Dan:
<cfloop from="1" to="#totalYears#" index="y">
<cfset tempYear = qryResult["year_" & #y#] />
<cfset QuerySetCell(firstQuery, "year_#y#", round(tempYear))>