Thanks
Thank you very much for your time and trouble. You answered my question clearly and concisely and were most helpful, I really appreciate it. Regards
User Profile
Collapse
-
Thanks so much for your insight. Perhaps I can approach solving my problem by asking my question in a differnt way. The field is a VARCHAR. Examples of values are SG1, SGO1, SG147a, SG12 (ie all start with an alpha, but then a mix of alpha/number.
How would you do a natural sort on this? Would, for example ORDER BY CASE('thisfield ' AS SIGNED) be the correct approach. Many thanksLeave a comment:
-
mySQL natural sort
Hi everyone.
I have two tables in the same DB. They both contain alphanumeric codes like "XX123". (one looks up the other) I need to do a natural sort on these in both tables. In one table if I use the trick +0 it works perfectly :
However in the other tableCode:SELECT * FROM `thistable` ORDER BY `thiscode` + 0 ASC
...Code:SELECT * FROM `product_master_file` ORDER BY `thiscode`+ 0 ASC
No activity results to display
Show More
Leave a comment: