Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 ordering records based on % relevance of query

Author  Topic 

mikeg
Starting Member

2 Posts

Posted - 2001-02-20 : 12:10:07
Hi

I am running a query based on the following scenario:

SELECT field1,field2,field3 FROM tablename WHERE (colname1 LIKE '%criteria1%' OR colname2 LIKE '%criteria2%' OR colname3 LIKE '%criteria3%')

I want to be able to order the returned records based on the 'percentage' a record satisfied the query, i.e a record that matches all three criteria should obviously be at the top.

T.I.A

mikeg
   

- Advertisement -