Guest_imported
New member
- Jan 1, 1970
- 0
hi everybody, i am sorry to bother you...i have an sql question <br>i am doing a search routine using the following sql: <br><br>select distinct BRITEM,BRDESC,BRPIC1,BRPHAS,BRLINK,BRDROP,BRSTCK<br>from pwbits<br>where ((UCASE(BRITEM) like 'THI%' or<br> UCASE(BRITEM) like '% THI%' or<br> UCASE(BRKWR1) like 'THIS%' or<br> UCASE(BRKWR2) like 'THIS%' or<br> UCASE(BRKWR3) like 'THIS%' or<br> UCASE(BRDESC) like 'THI%' or<br> UCASE(BRDESC) like '% THI%')<br><br> or<br><br> (UCASE(BRITEM) like 'CHE%' or<br> UCASE(BRITEM) like '% CHE%' or<br> UCASE(BRKWR1) like 'CHEES%' or<br> UCASE(BRKWR2) like 'CHEES%' or<br> UCASE(BRKWR3) like 'CHEES%' or<br> UCASE(BRDESC) like 'CHE%' or<br> UCASE(BRDESC) like '% CHE%'))<br><br> order by BRITEM for fetch only<br><br><br>basically its a web search engine...i am searching for any records that <br>have the words 'like' or 'cheese' <br>my problem is that i would like to show first the records that have both words ('like' and 'cheese') and then the the records<br>that have just one of the words ('like' or 'cheese')...you know sort <br>of a percentage search thing.... <br>is it possible in sql with a select statement...the table is already created... <br>thanks before hand and sorry about taking your time, <br>adiel