Wow, it works!. Are you a witch? :D Would you please unwind this query for me?
----- Original Message ----- From: "Marian Dumitrascu" <[EMAIL PROTECTED]> try this , (but you'll need an unique id): select * from table t1 where t1.id in (select top 1 id from table t2 where t2.number = t1.number) union select * from table t4 where t4.id in (select top 1 id from table t3 where t3.number = t4.number and t3.id not in (select top 1 id from table t2 where t2.number = t4.number)) order by number -Marian :) ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists