I, and another guy, used this years ago to do just that.

http://cflib.org/udf.cfm?ID=1021

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com


-----Original Message-----
From: Richard White [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 06, 2008 1:22 PM
To: CF-Talk
Subject: query on query advice

hi, 

i have 2 coldfusion queries and need to combine them together on their
primary keys

the problem is, is that i don't know what the column names will be, i only
know what the primary keys will be. 

therefore i have no idea how to join them together based on this. i usually
join queries together using:

select s.subject id, t.testid from subjects s, tests t etc...

i also know that query on query in coldfusion is very limited. so i would
like some advice on the best possible way to do this please

Note: i Have looked on cflib and seen a query merge function but it only
allows me to pass in 1 column name as a primary key whereas my queries have
more than 1 primary key (1 query has subjectid, testoccasionid - and another
query has subjectid, testoccasionid, and tesid - so i need to join them up
based on the subjectid, and testoccasinid)

for example, i have 2 queries:

query1 = subjectID(PK), testOccasionID(PK), .... x amount of additional
columns
query2 = subjectID(PK), testOccasionID(PK), testID(PK).... x amount of
additional columns

they are both queries in coldfusion so i may be wrong but i am thinking that
i can only use query on query to join them but i am not sure how

thanks for your help

richard 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304804
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to