that will work..
or if you can guarantee that it always prefixed with '#' you can try

select id from mydata
order by if(left(id,1)='#',concat('z',id),id)

or if you didnt sure.. you can try the similiar way..

select id from mydata
order by if(left(id,1)<'A',concat('z',id),id)

just make sure that you change the first letter to something greater
than 'z' (ps: that if you want it ordered character first followed by
anything else)

select id from mydata
order by if(left(id,1)<'A',concat('z',id),id)

thats just a theory, i have not try it my self :)
and you should considered that it will processed all row (in other
word.. slooowww.. if you have many records)

HTH
Leo

On Sun, 22 Aug 2004 21:03:42 -0400, Michael J. Pawlowsky
<[EMAIL PROTECTED]> wrote:
> 
> select id from mydata order by name.
> 
> If that puts the #125 first etc. simply created a field called
> 'order_field' or whatever and put numeric values in them.
> The SELECT id, name FROM mytable ORDER by order_field.
> 
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to