MySQL Forums
Forum List  »  MySQL Query Browser

help on query order by string and number
Posted by: Mathew
Date: October 11, 2005 02:43AM

Please help me to find a solution i have a varchar filed "QUAL_MEN"having follwing values
OG1
OS3
0G11
OS9
OG2
OG3
OS30
I NEED TO SORT THEM lIKE THIS
OG1
OG3
OG11
OS3
OS9
OS30
I TREID SORTING BY CHAR + NUMBER LIKE THIS
> ORDER BY QUAL_MEN , CAST( SUBSTRING( QUAL_MEN, 3 , 2) AS SIGNED ) IT IS SORTED BUT NOT KEPT THE NUMERIC ORDER FOR THE SECOD SORT
pLEASE HELP

Options: ReplyQuote


Subject
Written By
Posted
help on query order by string and number
October 11, 2005 02:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.