List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:May 27 1999 7:25pm
Subject:Re: Is this possible?
View as plain text  
Mark Papadakis wrote:
> 
> Hi!
> 
> Is something like that expressed in any way in (my)SQL?
> 
> select column like something as a1, column like something2 as a2, a1+a2 as
> count from table order by count;
> 
> Basically, I want to sort it based on the number of keywords found in a
> string. So, lines that contain more keywords
> should show up first.
> 
> Of course, the above query doesn't work. Any ideas?
> 
> Thank you,
> Mark

Hi Mark

Your question isn't clear to me.
Do you search something like this?
SELECT
	a.column AS a1
	, b.column AS a2
	, a.column + b.column AS count
FROM
	columnTable AS a
	, columnTable AS b
WHERE
	a.id <> b.id
	AND a.value = something
	AND b.value = something
ORDER BY
	count


Tschau
Christian

Thread
Is this possible?Mark Papadakis27 May
  • Re: Is this possible?Christian Mack28 May
  • Is this possible?Michael Widenius2 Jun