RE: Order by - problem with numerics in varchar field

2002-07-12 Thread Jay Blanchard
[snip] I'm having trouble with ordering. I've got data in a varchar field that currently gets ordered like this when I use 'order by myfield asc': aristo 1001 aristo 156 aristo 222 I'd like it to order like this: aristo 156 aristo 222 aristo 1001 How can I do this in MySQL? Is there a way

Re: Order by - problem with numerics in varchar field

2002-07-12 Thread Keith C. Ivey
On 11 Jul 2002, at 16:06, Dan Lamb wrote: I'd like it to order like this: aristo 156 aristo 222 aristo 1001 How can I do this in MySQL? Is there a way to take the numbers into account when using order by? There are various ways to break up your strings and convert part to a number