Reputation: 11403
I've got a result set I have to sort in quite a complex way. There are two fields (A and B) which are employed in the sorting, and the algorithm is like this:
More information:
How can I do this in MySQL through a SQL query? Am I forced to do it cient-side?
Upvotes: 0
Views: 108
Reputation: 77707
…
ORDER BY
A,
CASE WHEN A LIKE CONCAT('%', K, '%') THEN Func(B) ELSE B END
Upvotes: 3