Please clarify exactly what you want to retrieve... Gene
-----Original Message----- From: Jillian Carroll [mailto:jillian@;koskie.com] Sent: Monday, October 28, 2002 2:34 PM To: CF-Talk Subject: RE: SQL Query Results If I use 'OR', won't it stop evaluating once it finds a match? -----Original Message----- From: Gene Kraybill [mailto:Gene.Kraybill@;adelphia.com] Sent: Monday, October 28, 2002 1:26 PM To: CF-Talk Subject: RE: SQL Query Results If I understand your intention correctly: WHERE s1_trainer1 = #client.id# OR s1_trainer2 = #client.id# OR s1_trainer3 = #client.id# OR ... Gene K. -----Original Message----- From: Jillian Carroll [mailto:jillian@;koskie.com] Sent: Monday, October 28, 2002 2:14 PM To: CF-Talk Subject: SOT: SQL Query Results How can I adjust the following query so that it checks every trainer (s1_trainer1, s1_trainer2, etc.) for a match to #client.id# without having to do 10 queries? <cfquery name="courses" datasource="#DSN#"> SELECT id, type, other, city, prov, s1_startdate, s1_trainer1, s1_trainer2, s1_trainer3, s1_trainer4, s1_trainer5, s2_trainer1, s2_trainer2, s2_trainer3, s2_trainer4, s2_trainer5 FROM courses WHERE s1_trainer1 = #client.id# ORDER BY s1_startdate DESC </cfquery> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com

