Here's the actual code used and now working....
The Query:
<cfquery name="branches" datasource="XXX">
select
B1.br_name, B2.br_name as subname,
B1.branchID, B2.branchID as subID,
B1.br_contFName, B2.br_contFName as subFName,
B1.br_contLName, B2.br_contLName as subLName,
B1.br_contEmail, B2.br_contEmail as subEmail,
B1.br_subbranch, B2.br_subbranch as subbranch
FROM
dbo.app_branches B1
LEFT JOIN
dbo.app_branches B2
ON B1.branchID = B2.br_subbranch
WHERE B1.br_subbranch = 'A'
</cfquery>
The Output code:
<cfoutput query="branches" group="br_name">
Branch: #br_name" Contact: #br_contFName# #br_contLName#
<cfoutput>
Sub-Branch: #subname" Contact: #subFName# #subLName#
</cfoutput>
</cfoutput>
...and then from there you can delete, modify or reassign any of them -
EXCEPT that a sub branch can absolutely not EVERY have a sub branch under
it.....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.