This is a basic join problem:

<cfquery name="getDistrictPlanDocs" datasource="#request.dsn#">
  SELECT        * 
  FROM  district_plan_documents
  ORDER BY      DP_catID, Line_Order
</cfquery> 
 
<cfquery name="getDistrictPlanHeadings" datasource="#request.dsn#">
  SELECT        * 
  FROM  district_plan_section_headings
  ORDER BY      DP_catID
</cfquery>


SELECT
  *
FROM
  District_plan_document plan INNER JOIN district_plan_section_headings 
headings ON plan.DP_catID = headings.DP_CATID

ORDER By
  DP_catID, Line_Order


You could use the Access visual wizard to create this sql for you.  Fairly easy 
to use, and by studying the SQL it creates can get you a nice tutorial on 
creating this SQL.  One of the ways I learned it.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224143
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to