
April 2nd, 2005, 05:32 PM
|
|
Contributing User
|
|
Join Date: Jan 2005
Posts: 80

Time spent in forums: 1 Day 4 h 20 m 54 sec
Reputation Power: 4
|
|
Joining data from 2 tables and grouping output
I've been trying to get this to work for hours with no luck. I have 2 tables - [data] and [faculty] - and I need to generate output that includes every record in [data] one time each and lists multiple records in [faculty] for each record in [data]. The two are linked by the fields data.ID and faculty.dataID.
After about a hundred variations, what I curently have is:
<CFQUERY NAME="output" DATASOURCE="gus-survey">
SELECT *
FROM Data LEFT OUTER JOIN Faculty
ON data.ID = faculty.dataID
</CFQUERY>
<CFOUTPUT="output" GROUP="dataID">
....
</CFOUTPUT>
This lists each record in [data] but only one record from [faculty] rather than all that match. What do I need to change to get the complete list of [faculty] records that match the [data] record?
Thanks,
Jason
|