Solved

Add Values to Coldfusion Query

Posted on 2010-08-17
2
242 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I use EncodeForURL() in ColdFusion with CFGRID 5 33
CFFILE upload help 98 136
Coldfusion - query to list question 3 25
Fixing Old Legacy Code 1 24
Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now