>> It's not impossible: >> 'SELECT *,SUBSTRING_INDEX(name,\' \',-1) AS surname FROM fe_users >> ORDER BY surname,name' > > Ok, now make this work on at least PostgreSQL and Oracle as well - > without any variants. *One* statement for *all* databases. This > clearly rules out anything non-standard. Yes! So let's do something about it. /Stig