> Using 6.1 and Access DB...
> 
> Is there a way to combine two data sources to generate a 
> CFSELECT list?
> 
> I have a list of storage locations, and a list of 
> participants. My select list will result in allowing the end 
> user to tell me that the item is at a storage location, or 
> with a participant.
> 
> The list of participants is in one database, and the list of 
> locations is in another. How do I make them appear in one list?

You can use query-of-query functionality to build one query from the union
of two existing queries, as long as the datatypes of the data you want are
similar in both queries. You may need to alias fields in the original
queries to get the names to match.

<cfquery name="q1" datasource="ds1">
SELECT storageid AS id,
       storagename AS name,
       'storage' AS type
FROM     storage
</cfquery>

<cfquery name="q2" datasource="ds2">
SELECT participantid AS id,
       participantname AS name,
       'participant' AS type
FROM     participant
</cfquery>

<cfquery name="q3" dbtype="query">
SELECT id, name, type
FROM     q1

UNION

SELECT id, name, type
FROM   q2
</cfquery>

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202189
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to