I've got a one to many relationship linking tables A -> B -> C.  For
each item in A (sales reps), I've got multiple records in B (linking
reps to territories) and C contains the territories - say North, South,
East and West.  I want to output a table something like

Reps   Territories
-----  ------------
Bill   S,W
Mike   N,S,E
Joe    E,W

The question is: Can I use CF's <cfoutput QUERY="myquery"
GROUP="AgentID"> to easily create this table?  If so, how do I produce
the lists of territories?  Grouping on the RepID essentially throws out
the 2nd, 3rd, 4th etc. territory and I can only display the first one.
If it can't be done easily in CF, can it be done in SQL (MS SQL)?  My
last resort would be to just get all the reps, loop through that query
and do a query on B & C each time through the loop.  That's what I'm
trying to avoid.

Thanks,
Jim

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to