ORDER BY CASE WHEN ISNUMERIC(client_code) = 1 THEN CAST(client_code AS
INT) END,
CASE WHEN ISNUMERIC(client_code) = 0 THEN client_code END


--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.


"Phoebe." <phoebe8124hotmail.com> wrote in message
news:OoVXo5eRDHA.2636TK2MSFTNGP10.phx.gbl...
> Hi, Good Day!
>
> I've created a set of database in my SQL 2K server.
>
> I've define my Client code as char(7) ratther than integer type because I
> have a few client code which consist of alphabet. . So when comes to
> sorting, it will sort from 1st character of my client code. For eg.
> 102345, 11003, 1324, 13599, A1452
>
> how can i sort the records like following:
> 1324, 11003, 13599, 102345, A1452
>
> Can someone help.
> Thanks in advanced.
>
> rgds,
> Phoebe.
>
>