Solved

Add Values to Coldfusion Query

Posted on 2010-08-17
2
241 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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

12 Experts available now in Live!

Get 1:1 Help Now