Re: Sorting Question

2007-06-21 Thread Perrin Harkins
On 6/21/07, CA Lists <[EMAIL PROTECTED]> wrote: Note that "uid" 12880 is now AFTER 12878, which is its parent. Sounds like you want ORDER BY COALESCE(parent, uid) DESC. - Perrin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql

RE: Sorting question

2003-11-14 Thread Chris
You could try this: ORDER BY SUBSTRING_INDEX(TheColumn,'.',1), SUBSTRING_INDEX(SUBSTRING_INDEX(TheColumn,'.',-2),'.',1)+0, SUBSTRING_INDEX(TheColumn,'.',-1)+0 It is quite slow though, If possible, I'd suggest splitting that one column into 3 separate columns. You woudl save space (not deci