hi. I'm giving you an "Oracle style" solution, with more adjustment it will work on your situation:<br><br>select distinct BRITEM, BRDESC, BRPIC1, BRPHAS, BRLINK, BRDROP, BRSTCK,2 as criteria<br>from pwbits<br>where (<br> (UCASE(BRITEM) like '%THIS%' and<br> UCASE(BRITEM) like '%CHEESE%') or<br> (UCASE(BRKWR1) like %THIS%' and<br> UCASE(BRKWR1) like '%CHEESE%') or<br> (UCASE(BRKWR2) like %THIS%' and<br> UCASE(BRKWR2) like '%CHEESE%') or<br> (UCASE(BRKWR3) like %THIS%' and<br> UCASE(BRKWR3) like '%CHEESE%') or<br> (UCASE(BRDESC) like %THIS%' and<br> UCASE(BRDESC) like '%CHEESE%')<br>  

<br>union all<br>select distinct BRITEM, BRDESC, BRPIC1, BRPHAS, BRLINK, BRDROP, BRSTCK,1 as criteria<br>from pwbits<br>where (<br> (UCASE(BRITEM) like '%THIS%' and<br> UCASE(BRITEM) not like '%CHEESE%') or<br> (UCASE(BRITEM) not like '%THIS%' and<br> UCASE(BRITEM) like '%CHEESE%') or<br> (UCASE(BRKWR1) like %THIS%' and<br> UCASE(BRKWR1) not like '%CHEESE%') or<br> (UCASE(BRKWR1) not like %THIS%' and<br> UCASE(BRKWR1) like '%CHEESE%') or<br> (UCASE(BRKWR2) like %THIS%' and<br> UCASE(BRKWR2) not like '%CHEESE%') or<br> (UCASE(BRKWR2) not like %THIS%' and<br> UCASE(BRKWR2) like '%CHEESE%') or<br> (UCASE(BRKWR3) like %THIS%' and<br> UCASE(BRKWR3) not like '%CHEESE%') or<br> (UCASE(BRKWR3) not like %THIS%' and<br> UCASE(BRKWR3) like '%CHEESE%') or<br> (UCASE(BRDESC) like %THIS%' and<br> UCASE(BRDESC) not like '%CHEESE%')<br> (UCASE(BRDESC) not like %THIS%' and<br> UCASE(BRDESC) like '%CHEESE%')<br>  

<br>order by 8 DESC,1 for fetch only.<br><br>It creates a new column depending on the type of the condition in the WHERE clause. If the row meets both condition it "wins" a value 2 of criteria, if it meets only one condition, it "wins" a value 1 of criteria. I hope I've written this clear enough. Good luck.<br>Regards, <p>Eduard Stoleru<br><a href=mailto:e_stoleru@yahoo.com>e_stoleru@yahoo.com</a><br><a href= > </a><br>