List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 27 2002 6:24pm
Subject:Re: How can I Sort by Relevance?
View as plain text  
At 15:05 -0300 3/27/02, Walter D. Funk wrote:
>I have a query like this
>select * from PROFILES where UCASE(DESCRIPTION) like '%A%'
>the result of this will be a set in which any member contains at least an
>but I'd like to sort them so as the result set becomes like this
>first: "A"
>second:  "AAA"
>third:  "any string containing an A"
>and so on
>I´d like to display results this way , in this case the first data is much
>relevant than the third one.
>But in the practise i get all results mixed up
>i will appreciate any help

LIKE evaluates to true or false, it doesn't return a relevance ranking.
You could play tricks with an expression in an ORDER BY clause, but
it's bound to be ugly.
How can I Sort by Relevance?Walter D. Funk27 Mar
  • Re: How can I Sort by Relevance?Paul DuBois27 Mar
  • Re: How can I Sort by Relevance?Rodney Broom27 Mar
  • Re: How can I Sort by Relevance?Jeff Kilbride27 Mar
    • What is wrong in this query???Javier Armend├íriz27 Mar
      • Re: What is wrong in this query???Paul DuBois27 Mar
RE: How can I Sort by Relevance?Lopez David E-r9374c27 Mar
RE: What is wrong in this query???Rick Emery27 Mar