I refer to my recent question, http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_23138538.html
I have managed to get my list working in alphabetical order by the surname, this can be seen in action here, http://www.arrivalpreview.co.uk/testing/ee.asp
, the top dropdown is the new ordered list and the bottom one is the original list.
I am more than happy with the top list being ordered now by the surname, however there are just a couple of names on there that have a title and this is causing the name to appear incorrectly with the first name still first, i.e. "Bob Smith, Sir" is appearing, but this should be "Smith, Sir Bob".
I understand InStrRev would be able to do this but this will not work in my ASP page as it says it's undefined?
Here is my current query:
SELECT memberID, Right([memberName], len([memberName])-INSTR ([memberName],' ')) + ', '+ Left([memberName], INSTR ([memberName], ' ')) AS reverseName FROM cvs ORDER BY Right([memberName], len([memberName])-INSTR ([memberName],' ')) + ', '+ Left([memberName], INSTR ([memberName], ' '))