Didn't get a response to my last thread so i thought i'd try a simplified version.
Basically what i'm trying to do is order some results based on whether they match some criteria.
The query is of the form
SELECT distinct *, (apple='delicious' AND pear='rotten') as Relevance FROM tblfruit...
Hi,
I'm trying to sort results using sets of conditions returning either 1 or 0.
The following sql is looking at two relational tables where tbljobs.id is related to tbljob_location.job_id
SELECT distinct tbljobs.*,
(tbljobs.phase='Pre School' and tbljobs.id=tbljob_location.job_id AND...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.