MySQL Forums
Forum List  »  MySQL Query Browser

Re: Select query with GROUP condition thens order by alphanumeric
Posted by: Chu Soon Tan
Date: December 11, 2009 02:10AM

Chad Bourque Wrote:
-------------------------------------------------------
> Chu,
>
> I think you are going to have to write a function
> that takes a string and returns a string. In that
> function, iterate the string, and translate each
> character into another character that will sort
> how you want. I would think this would be slower
> than you'd like, too, but I can't think of another
> way since the various characters can be anywhere
> in the string.
>
> If you have to have that special sorting, I would
> probably add another column to the table for the
> sort value and do the translation I mentioned
> above on insert and update triggers, populating
> that new column. Then, you could just order by
> that column.
>
> HTH,
> Chad


Hi CHad:


yaya......and i also try divide it into 3 query....

first query all special char, then alpha the numeric...but it was damn slow......

i have almost 30k row in the table and the data will keep growing....currently i already feeling the slow process...

jz try do some research may it was some super query that i may not able to think it...:)

thanks


chusoon

Options: ReplyQuote




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.