| Subject | Re: [firebird-support] How can I order a varchar field, if the content is numeric ???? | 
|---|---|
| Author | Martijn Tonies | 
| Post date | 2004-10-15T13:03:47Z | 
Hi,
select cast(cod as integer),
...
from ...
order by 1
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
            > I have a VARCHAR field, name COD. If the column have only numericPerhaps with:
> vaues, i want to order this field like numeric value (1, 2,
> 3, ...10, 100), not like varchar (1, 10, 100, 2...)
>
>
> How can i make that? An example please!!!!
select cast(cod as integer),
...
from ...
order by 1
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com