Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

Add Values to Coldfusion Query

I have a CF query that returns a paired value:  
CompanyName, Value
CompanyName, Value
CompanyName, Value

I need to be able to add the Average Value into the list and then sort it so that the average is in the appropriate spot.   That entry would be AVERAGE, Value.    I can't just sort both columns since that won't keep the pairs together...

I feel like this should be easy and I just missing something obvious.   Any ideas?
0
digitalwise
Asked:
digitalwise
1 Solution
 
PluckaCommented:
Add a column with queryAddColumn

then loop over the query and set the column with querySetCell

Then use query of query to sort it again.
0
 
digitalwiseAuthor Commented:
I needed to do queryAddRow but thank you for the reminder on how to do this - I knew I was forgetting something!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now