Question

Is there a way to round to 2 decimals in a query-of-query on an avg statement? I could not find a system function in the adobe docs.

Was it helpful?

Solution

Not in QoQ, no. The full docs for QoQ are here: "Query of Queries user guide". That includes the entirety of QoQ's functionality.

You're just gonna have to do the rounding when you're using the recordset.

It might be worth raising a ticket on the bug tracker to get an enhancement for this: https://bugbase.adobe.com/. It's functionality I've needed in the past.

OTHER TIPS

I needed to do a similar thing to use the QoQ result in a chart. I ended up using the QuerySetCell to format the QoQ column.

In the example code below, qryResult was my QoQ query name and MWDPCT was the column that I wanted to reformat.

<cfloop query="qryResult">
  <cfset temp = QuerySetCell(qryResult,"MWDPCT", decimalFormat(qryResult.MWDPCT),currentrow)>
</cfloop>

Hope that helps a bit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top