ColdFusion CFScript Query of Queries Example

This post is more for me than anything else...but I couldn't find a decent example of how to write a query of queries in ColdFusion's CFScript syntax. Below you'll see two queries; the first one is a simple query using ColdFusion's auto-generated dsn, the second one narrows the result set just a bit.

<cfscript>
    // Basic Query Syntax
    q1 = new Query();
    q1.setDatasource('cfartgallery');
    q1.setSQL('select * from artists');
    rs1 = q1.execute().getResult();
    WriteDump(var=rs1,label='RS1');
    
    // Query of Queries
    q2 = new Query();
    q2.setDBType('query');
    q2.setAttributes(rs=rs1); // needed for QoQ
    q2.addParam(name='state', value='CO', cfsqltype='cf_sql_varchar');
    q2.setSQL('SELECT * FROM rs where state = :state');
    q2.setMaxRows(2); // limit max rows, if desired
    rs2 = q2.execute().getResult();
    WriteDump(var=rs2,label='RS2');
</cfscript>

This should produce something similar to the following output:

Hope this helps...cheers!

Comments
I always forget how to do this. Thanks for the reminder!
# Posted By existdissolve | 11/9/12 9:27 AM
Sweet. Thanks!
# Posted By BeekerMD03 | 7/9/15 2:54 PM
ColdFusion CFScript Query of Queries Example which detail you like to mentioned in this article. Such queries are very unique and very result oriented. However, I try to find some more reviews of http://best-essay-writing-service.reviews/ and this will be sound good for us. Thanks for it.
# Posted By Chunen | 11/11/17 5:42 PM
A valid and detailed information about coldFusion CFscript query of queries Example have this article for us. We should follow the approach like https://appuals.com/how-to-fix-high-cpu-usage-by-s... which is very user friendly and easy to understand what is the actual topic of discussion.
# Posted By sumeerkumar | 11/27/17 7:38 PM
It is worth mentioning that rolex replica watches http://www.rolexreplicasstore.uk.com the redesigned middle case has become thinner, and with a flat blue crystal mirror, unlike the other models of the round mirror mirror, so that http://www.swisswatchjust.co.uk the watch does not look uk replica watches sharp from the side, even more harmonious.
# Posted By watch | 3/22/18 9:52 PM
Very nicely you described here two queries, a simple query using ColdFusion's auto-generated dsn, and the second one narrows the result set just a bit. This result oriented query are very helpful for IT students and developer of Personal Statement Folks - http://www.personalstatementfolks.co.uk/, which is result-driven personal statement writing help providers in UK, so students can get admission in their dream college or university. Given queries are user friendly and very easy to understand and I am sure students must be appreciate you for sharing this ColdFusion CFScript Query of Queries Example.
# Posted By Caroline | 4/10/18 3:31 AM
However you don’t found decent example still it is really understandable example of writing of how to write a query of queries in ColdFusion's CFScript syntax for developers as well as amateurs. ColdFusion platform users who are getting career advice and CV writing help from the CV Folks – https://www.cvfolks.co.uk should definitely find it helpful and recommend to others.
# Posted By Lauren | 4/11/18 1:05 AM
IWC's "Little Prince" series has http://www.bestukwatches.co.uk always been a very http://www.rolexsreplicas.org.uk popular watch series. Its highly recognized and very attractive blue dial and the http://www.toprolexreplicauk.co.uk story of the "Little Prince" have made this watch a highly watchful http://www.perfectreplicawatch.me.uk companion favorite.
# Posted By dsv | 5/14/18 9:18 PM
I am really glad to read it and being able to share my thoughts on it. I want to use this opportunity <a href="https://www.fbvideo.me/"; title="facebook video">facebook video</a>
to say that I really love this blog. It is an amazing resource of information for my working. Thank you so much.
# Posted By facebook video | 8/29/18 3:44 AM
Wig female, pear https://www.wigsandclips.co.uk flower head, air Qi Liu Hai, inside the http://www.humanhair-extensions.co.uk middle point, fashion and natural, realistic https://www.humanhairwig.org.uk micro-volume, wig set,https://www.hair-extensions2go.co.uk head black, Korean side, new specials.
# Posted By hair extensions sale | 8/30/18 2:48 AM
Thanx for sharing such useful post keep it up :)
# Posted By Accounting Managerial Writing Service | 9/28/18 1:51 AM
I’m really impressed with your article, such great & usefull knowledge you mentioned here
# Posted By Accounting Managerial Writing Service | 9/28/18 5:55 AM
I’m really impressed with your article, such great & usefull knowledge you mentioned here
# Posted By Accounting Managerial Writing Service | 9/28/18 6:02 AM
http://percentagecalculator.wiki/
Je vous remercie de l'information! Je cherchais et ne pouvait pas trouver. Vous me aidé!
# Posted By percent calculator | 10/2/18 2:15 AM
This content is very informative for me. Thank you so much for sharing. Need Allassignmenthelp? Allassignmenthelp Provide best all Assignment Help to the student at cheapest cost.
# Posted By Assignment Help | 12/29/18 3:23 AM
In today’s time students face the problem of stress in college. Whether it is because of social anxiety, or not being able to clear exam etc. Most of the times, students get stressed due to their piled up assignments. If it is with you also then you might look for Allassignmenthelp.co.uk Reviews .
# Posted By Assignment Help | 12/29/18 5:31 AM
I’m really impressed with your article, such great & usefull knowledge you mentioned here. Thank you for sharing. https://www.igstories.net/
# Posted By instagram viewer | 1/2/19 9:38 PM
Great query example I really like it keep it up and visit https://logoliberty.site123.me/
# Posted By ameliehaine | 11/11/19 5:09 AM
Extraordinary blog. I took pleasure in scrutinizing your articles. This is extremely magnificent examined for me. I have bookmarked it and I am envisioning scrutinizing new articles. Continue doing great!
http://www.jaipurescorts.net.in/escorts-locations/...
http://www.jaipurescorts.net.in/escorts-locations/...
http://www.jaipurescorts.net.in/escorts-locations/...
http://www.jaipurescorts.net.in/escorts-locations/...
http://www.jaipurescorts.net.in/escorts-locations/...
# Posted By Shweta Sharma | 12/11/19 1:25 AM
https://topnaturalmattresses.com/buckwheat-pillow/...
After 8 years as a sleep expert in a couple of mattress stores and seeing thousands of people experiences with many brands, he decided to write and put all of these years of experience into help guides so others can make the right decision when buying sleep products without having to suffer sleepless nights as a result of choosing the wrong mattress.
# Posted By Sara Taylor | 12/21/19 9:11 AM
I am very curious to know people's opinion about my article on altoconvertpdftoppt. It is a big step for me as I posted something on the internet for the first time and according to me it is good. But I want to read reviews about it.
# Posted By altoconvertpdftoppt | 2/1/20 5:40 AM
TN ECS status: Tamil Nadu government has launched a TN ECS online portal for the citizens especially the government employees and pensioners of the state can check pension status. Through this portalthey can check their Tamil Nadu ECS status whenever and from anywhere they want. TN ECS status: Tamil Nadu government has launched a TN ECS online portal for the citizens especially the government employees and pensioners of the state can check pension status. Through this portalthey can check their Tamil Nadu ECS status whenever and from anywhere they want. TN ECS portal is providing help to the retired employees of the Tamil Nadu state. Now they do not have to visit the Treasury of revenue office to check the status of their pensionDDO Token and salary of government employees. They can check status with the help of online ECS portals in seconds.
# Posted By tn try ecs status | 2/11/20 1:56 AM
I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!..
# Posted By AP pharma-d web counselling | 4/26/20 7:33 AM
Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done.   <a href="http://104.223.76.206/viralqq/">viralqq<...;
# Posted By AP pharma-d web counselling | 5/8/20 11:39 PM
Great data! I starting late kept disconnecting for after down after a short-range of your blog and have been looking. I figured I would leave my first comment. I don't see what to state near that I have.
http://www.dubaiescortsmodels.com/
# Posted By Ekta Kaur | 6/27/20 11:56 AM
The need and utilizing this novel succeeding interface with the clients to know your appreciation Dubai Call Girl The fix you will get from the female additional who picks you relies upon to the animal entire about the cleaned objectivity which you really appear from the club.
http://www.dubaiteenescorts.com/
# Posted By Ekta Kaur | 6/27/20 12:00 PM
Best SEO Agency in Pakistan
Digisiz offers complete range of online marketing services including SEO, SMO & PPC. We are working in Italy and Pakistan and had a proven record in the field of Digital Marketing. We have been working in the field of Online Marketing for the last 5 to 6 years. We can help you get better exposure for your products & campaigns. Improve your digital presence positively engage with your community.
https://www.digisiz.com/

# Posted By jibran ahmed | 7/18/20 2:11 AM
Best Jurassic World Alive Game 2020
The game story is all about dinosaurs on an unstable island. In the Jurassic world, they can freely move, and we have to hunt them and collect their DNA .The fusion of dinosaurs can boost the level of players.The number of resources offered in Jurassic world alive game in the result of rewards like bucks, darts, coins, incubator.Artificial intelligence used to communicate dinosaurs and the sci fictions ideas make every efforts to clone dinosaurs. The more you quick, the most you succeed, use the coupons of victory to win your destination.
http://Jurassicworldalivehack.com
# Posted By jibran ahmed | 7/18/20 2:11 AM
Best Darkness Rises Game 2020
Darkness Rises is a mobile game that is available on both Android and iOS. Darkness rises is the third chapter of the great Dark Avengers series brought to you by NEXON. The aim of the game is to use one of the many playable classes and back against an army of devils! This lone Action RPG blends amazing graphics with an intense story to form a game unlike any other.
https://www.darknessrisesgame.com/


# Posted By jibran ahmed | 7/18/20 2:12 AM
moving sprinkler   Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!!

Unmistakably on the planet got the article, an obligation of gratefulness is all together for a get-together this! This is irrefutably one stunning post. Thankful for the key data and pieces of data you have so given here.
http://www.24escorts.uk/Location/Chelsea-Escorts.h...
http://www.24escorts.uk/Location/Kensington-Escort...
http://www.24escorts.uk/Location/Knightsbridge-Esc...
http://www.24escorts.uk/Location/Mayfair-Escorts.h...
# Posted By Taniya Wilson | 9/4/20 7:37 AM
Amazing post, Great article thank you for taking the time! still to your next submit you have been envisioning some vivifying. Your weblog pack is rich,

http://www.24escorts.uk/Location/Notting-Hill-Esco...
http://www.24escorts.uk/Location/Queensway-Escorts...
http://www.24escorts.uk/Location/Richmond-Escorts....
http://www.24escorts.uk/Location/Victoria-Escorts....
# Posted By ERA | 9/4/20 7:40 AM
your substance exceptional. An obligation of appreciation is all together for sharing, get quality article making provider to get over the top rating.
http://www.24escorts.uk/Location/Central-London-Es...
http://www.24escorts.uk/Location/Paddington-Escort...
http://www.24escorts.uk/Location/Whitechapel-Escor...
http://www.24escorts.uk/Location/Wandsworth-Escort...
# Posted By anle | 9/4/20 7:41 AM
Acadecraft provides top-notch Alt text services to define as well as design different diagrams, images, infographics, graphs, and others in the best possible manner. Alt text services from us allow users to gain a perfect and complete understanding of all pictographic images.
# Posted By Alt Text Services | 9/18/20 4:28 AM
www.google.com" target="_blank">https://www.google.com <a href="www.google.com" target="_blank">https://www.google.com">xxx</a> [url=www.google.com]BB[/url] keyword
# Posted By jack | 11/2/20 5:32 AM
Great articles and great layout.
http://www.dakshi.in/majestic-call-girls.html
http://www.dakshi.in/call-girls-in-whitefield.html...
http://www.dakshi.in/rajaji-nagar-call-girls.html
Your blog post deserves all of the positive feedback it’s been getting.
# Posted By yami malhotra | 11/5/20 2:38 AM
The Collection Marts is platform where you can view latest designs about home décor and bedding. We have large range in different categories with finest fabric in cotton and silk. You can view not only present trends but also view huge collection with reasonable price. The Collection Marts can provide fast service about delivery as well as customer support too. Our products are not only self-made but also, well connected with markets to ensure for possibility of available designs if client want to purchase. The Collection Marts customer support open 24/7 to guide their customers about material or product stuff./
# Posted By premium bed sheets | 12/23/20 4:28 AM
# Posted By Pak24tv | 1/12/21 10:21 AM
# Posted By charviduttaa | 2/12/21 4:23 AM
# Posted By charviduttaa | 2/12/21 4:25 AM
Glad to see this amazing article, You are giving motivation, inspiration to us. The substance you scattered here is reliably colossal. It caused me an indispensable measure to enlighten me. Grateful for your work and sponsorship for us, Keep Sharing for each condition such sorts of thing. Respected your Blog!!
http://www.hifimumbaiescorts.com/
http://www.mumbaiescortsagency.in/
http://www.mumbaiescortss.com/
http://www.escortsinmumbai.co.in/
# Posted By charviduttaa | 2/12/21 4:26 AM
# Posted By charviduttaa | 2/12/21 4:27 AM
Hi, Guys, I'm Alisha Bhabhi from Rajasthan Escorts Service. Furthermore, I'm working in a Rajasthan accompanies office. Also, our escort organization gives prominent escort young ladies. They give you any kind of escort administration and they give more fulfillment to you intellectually and truly inside the chestiest cost. so in the event that you need any kinds of escort administrations, at that point click on this connection and visit our site.
# Posted By Jaipur Escorts | 2/19/21 7:59 AM
Magnificent post! This is an OK blog that I will show more occasions to reestablish this year! Appreciative for the lit post.

http://www.femaleescortbnagalore.com/
http://www.bangaloreescortsgirls.in/
http://www.bangaloreescortsgirls.in/
# Posted By shriyasaran | 3/18/21 3:30 AM
Wonderful article on Spanish culture, you are a particularly stone in framing, I imagine the going with on the web journal.
https://www.thebangaloreescort.in/
http://www.hotbangaloreescorts.in/
http://www.bangaloreescortsservice.org/
# Posted By shriyasaran | 3/18/21 3:31 AM
If you are looking for a friend worth for your trust or someone you can bring to your tranny dating, you have found your answer. Welcome to TransSingle.com, the only place where transgender people get their best friend and true love.
https://www.transsingle.com/
# Posted By tranny dating | 5/19/21 10:34 AM
Brilliant stuff! this is to an awesome degree a bearable article I am telling a quick outcome of I read your article and I got know this is to an extraordinary degree a decent https://www.allvipescorts.com/ article. I need to state thank you for giving an essential stuff with a mind boggling point. I trust individuals love your article and give remarkable input.
# Posted By geetjaan | 6/30/21 7:21 AM
I'm perusing endlessly scrutinizing your web diary from my lap! Basically expected to state I revere examining your https://www.lustyneeds.com/ site and envision all of your posts! Carry on the famous work with custom paper composing administration.
# Posted By geetjaan | 6/30/21 7:22 AM
Unmatched evaluation close by your concur award me to hold your present oblige keep changed by using advancing toward blog segment. Much respected different close by you should go on the pleasurable complete it
# Posted By London Escorts | 7/2/21 10:12 PM
Unparalleled post, stay mindful of this historic work. It's ideal to fathom that this subject is generally speaking similarly covered on this site so maintains setting to the side the work to inspect this! Appreciative again and again!
# Posted By Escorts in London | 7/2/21 10:13 PM
I have been separating this subject for a some huge time interval. You have offered exceptional data in your post a couple of things I have not seen in other substance I have investigated by my associates.
# Posted By London Escorts Service | 7/2/21 10:15 PM
Fundamentally endeavor to pick ones substance can be as stunning. This clearness with your post is noteworthy and that I may recollect that you're an expert for this issue.

<a href="http://www.riyabhat.in/jaipur-call-girls.html"...; Jaipur Call Girl </a>
<a href="http://www.kingescorts.in/jaipur-call-girls.html&q...; Call Girl in Jaipur </a>
<a href="http://www.gasti.in/jaipur-call-girls.html"&g...; Call Girl Service Jaipur </a>
<a href="http://www.lustylove.in/jaipur-call-girls.html&quo...; Call Girl Service in Jaipur </a>
<a href="http://www.tania-sharma.in/jaipur-call-girls.html&...; Call Girl Agency Jaipur </a>
# Posted By Jaipur Escorts | 7/17/21 7:52 AM
Unmatched evaluation close by your concur award me to hold your present oblige keep changed by using advancing toward blog segment. Much respected different close by you should go on the pleasurable complete it
http://www.chennaiescortservices.co.in/jaipur-call...
http://www.chennaiescortgirl.co.in/Location/Jaipur...
http://www.bustychennaiescorts.com/jaipur-call-gir...
http://www.ahmedabad-escorts.com/jaipur-call-girls...
http://www.escortschandigarh.com/jaipur-call-girls...
# Posted By Jaipur Escorts | 7/17/21 7:53 AM
I am Suhana Khan, a Loney and Horny Girl available in Jaipur. If you are in Jaipur and seeking a hot and sexy girl then you can contact me now. I am ready to give you wonderful escort services in exchange of some money. I am 24 Years old young girl who will provide you most amazing sexual services in Jaipur, Rajasthan.
# Posted By Suahana Khan | 7/22/21 5:52 AM

Great substance. I like it. The creator of this post characterizes all focus accurately. A debt of gratitude is in order for posting
https://jaipurescortscoin.wordpress.com/

# Posted By Suhana Khan | 7/26/21 3:07 AM
# Posted By alisha5050 | 7/30/21 7:07 AM
Welcome, I just uncovered your site by structures for hurray. Your post is really genuine to my life as of now, and I’m genuinely singing I discovered your site.
# Posted By Jaipur Escorts | 8/3/21 5:57 AM
Very nice patterns collection, I really like it, Very creative. Thanks a lot for sharing !!
https://mysexproblemsolution.blogspot.com/2021/08/...

https://bangaloreescortsprice.blogspot.com/
# Posted By Suhana Khan | 8/7/21 4:30 AM
or many students. Because of this many students look for custom assignment help online. Don't worry! You are not the only one facing this difficulty. A lot of students out there find it hard to get their writing assignments written well in time and they seek college assignment help.
# Posted By Write My Assignment | 9/9/21 11:56 AM

© 2021, Stephen J. Withington, Jr.  |  BlogCFC was created by Raymond Camden – Version 5.9.004

Creative Commons License  |  This work is licensed under a Creative Commons Attribution 3.0 Unported License.  |  Hosted by Hostek.com