Hello: Can anyone plz tell me why I cannot get the correct output from this query It gives the following output shown below the query, when there should be no repeats (DISTINCT appears to not be working)
<cfquery datasource="#datasource#" name="list_audit_orgs"> SELECT audit_org_list.audit_org_id, audit_org_type.audit_org_type_id, audit_org_type.audit_org_type, audit_org_linking.audit_org_id2, audit_org_linking.audit_org_type_id2 FROM audit_org_list inner JOIN audit_org_linking on audit_org_list.audit_org_id=audit_org_linking.audit_org_id2 inner JOIN audit_org_type on audit_org_type.audit_org_type_id=audit_org_linking.audit_org_type_id2 </cfquery> <cfquery name="unique_info" dbtype="query"> SELECT distinct audit_org_id, audit_org_type_id, audit_org_type, audit_org_type_id2, audit_org_id2 FROM list_audit_orgs </cfquery> <cfoutput query="unique_info" group="audit_org_type_id"> audit_org_typebr><br> </cfoutput> Internal Auditors CPA Firms Federal Auditors CPA Firms Federal Auditors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327501 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4