Josh,

Have a look at Nate Weiss' CF_QueryMergeSideBySide
(http://www.nateweiss.com/taggallery/). To quote from the Docs:
--

This tag takes two query result sets and creates a new query that
contains data from both queries. The new query has all the columns from
the first query, plus all the columns from the second query. Whatever
was in row one of each query will be in the first row of the new query,
and so on. Please note that this tag makes no attempt to "sync up" or
"join" the rows intelligenty. It just copies data. It is your
responsibility to ensure that the first row of the first query
corresponds with the first row of the second query. 

The new query will have the same number of rows as the first query. This
means that if the first query has more rows than the second, the "extra"
rows will be unpopulated (blank) in the new query. If, on the other
hand, the second query has more rows than the first, the "extra" rows
will be ignored. Columns with the same name in both queries are assumed
to hold data in common and are included in the new query only once. 

--

hth,
larry

--
Larry C. Lyons
ColdFusion/Web Developer
EBStor.com
8870 Rixlew Lane, Suite 204
Manassas, Virginia 20109-3795
tel:   (703) 393-7930
fax:   (703) 393-2659
Web:   http://www.pacel.com
       http://www.ebstor.com
email: [EMAIL PROTECTED]
Chaos, panic, and disorder - my work here is done.
--

-----Original Message-----
From: JoshMEagle [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 8:02 AM
To: CF-Talk
Subject: How to combine queries


This was originally part 2 of a 2 part question .... 1 was answered ...

How do I combine 2 queries into one?

I have a query from <CFREGISTRY> and one from <CFQUERY> ... I'd like to
combine them into one query, say: qCombinedQuery so
that I can use the output in the <cf_TWO_SelectsRelated> tag ...

Any ideas?

Joshua Miller
Web Development
Eagle Technologies Group
Technology Solutions for the Next Generation
www.eagletgi.com
[EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to