Look at using the Reverse() function, then take the substring up to the first space, then reverse the result.
Andy > -----Original Message----- > From: Paul McNeil [mailto:[EMAIL PROTECTED] > Sent: 08 June 2004 14:04 > To: [EMAIL PROTECTED] > Subject: RE - Order By Problem > > I have never done anything like this but after looking at the spec's I > have > a possible direction for you.... > > In String functions there is > > LOCATE(substr,str,pos) > The first syntax returns the position of the first occurrence of substring > substr in string str. The second syntax returns the position of the first > occurrence of substring substr in string str, starting at position pos. > Returns 0 if substr is not in str. > > I think that if you create a function that uses this to strip the string > to > the left of the last found space and that returns the string to the right > you could call this in your query and use it in the order by statement. > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]