If I understand you correctly select * from tbl_meddelregos m, tbl_mdconfregoptions r where m.confregoptionid = r.confregoptionid and ( m.confregoptionid = 1 or m.confregoptionid = 6 or ) AND cocktailparty > 0 order by lastname
Sandra Clark ============= http://www.shayna.com Training and Consulting in CSS and Accessibility Team Fusebox -----Original Message----- From: Pete [mailto:[EMAIL PROTECTED] Sent: Saturday, March 10, 2007 7:02 PM To: CF-Talk Subject: SQL - slightly OT I have some SQL which I am trying to get working Basically here is what I have: select * from tbl_meddelregos m, tbl_mdconfregoptions r where m.confregoptionid = r.confregoptionid and m.confregoptionid = 1 or m.confregoptionid = 6 or cocktailparty > 0 order by lastname I keep on getting duplicate records in the output. Basically what I am trying to get I am joining 2 tables based on the confregoptionid (so as to get the code to display for the registration option). I then want to display all records which are m.confregoptionid = 1 (standard registration), m.confregoptionid = 6 (early bird registration) and then those records where a person has paid to attend the cocktail part (as it wasn't included automatically in the registration fee paid. Thanks in advance for replies. P ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272293 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4