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
>"A",
>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
>
>thanx
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.