Paul, do you need to accomplish this all in one query.......if not
<cfquery name="qcf_pid" datasource="">
SELECT id
FROM Product Table
</cfquery>
<cfoutput query="qcf_pid">
<cfquery name="qcf_check" datasource="">
SELECT id
FROM MenuTable
WHERE owner=#qcf_pid.id#
OR sub_object=#qcf_pid.id#
</cfquery>
if recordcount is zero, take action on the orphan record
</cfoutput>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists