I found this excellent little conditional order that sorts strings like "First Last" nicely, even correctly handling "First Van Damn".
"SUBSTRING(p.name, LOCATE(' ', p.name) +1)
Now I have names like "Alfred E. Newman" and want the sorting to work correctly for that name (that is, it does not end under E).
Any help would be greatly appreciated.
source
share