Re: numeric sort of a varchar field



Use Order By Cast(columnName as int), as long as all values are legitimate integers. But if so, why not make the column datatype int?

<eric.lecocq@xxxxxxxx> wrote in message news:521B05F4-CB45-4503-A3F9-BB821E27A67A@xxxxxxxxxxxxxxxx
Hello Everybody,

my question is the following. how can sort numerically a sql query with varchar field ?

.


Loading