Re: numeric sort of a varchar field
- From: "Paul Shapiro" <paul@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 22 Jan 2008 06:56:49 -0500
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 ?
.
- Follow-Ups:
- Re: numeric sort of a varchar field
- From: eric.lecocq
- Re: numeric sort of a varchar field
- References:
- SQL: numeric sort of a varchar field
- From: eric.lecocq
- SQL: numeric sort of a varchar field
- Prev by Date: SQL: numeric sort of a varchar field
- Next by Date: Re: numeric sort of a varchar field
- Previous by thread: SQL: numeric sort of a varchar field
- Next by thread: Re: numeric sort of a varchar field
- Index(es):
Loading