Solved

Add Values to Coldfusion Query

Posted on 2010-08-17
2
247 Views
Last Modified: 2012-05-10
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
Comment
Question by:digitalwise
2 Comments
 
LVL 18

Accepted Solution

by:
Plucka earned 500 total points
ID: 33459788
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
 

Author Comment

by:digitalwise
ID: 33460270
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to count the items in a structure 2 72
Using a variable with dateAdd 18 73
Detect and combat possible robot 7 109
Coldfusion combining queries 15 73
The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question