On Jan 13, 2010, at 8:11 PM, Gary Baranzini wrote:

> Hi,
>
> I'm having trouble sorting the following data:
>
> point_number  - VARCHAR(10)
> ------------
> 11.01
> 11.23
> 77.01
> 55.09
> A06
> 1010.01
> 1010.09
> A03
>
> How can I get the A03, A06 at the end of the list?


SELECT * FROM mytable
  ORDER BY CASE WHEN point_number GLOB '*[^0-9.]*' THEN point_number  
ELSE cast(point_number AS real) END;

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to