I have this SQL: Select ta_point from tblTally Group By ta_point which gives: 1 10 2 21 etc All values are numeric but it is a NVARCHAR field. I tried: Select ta_point from tblTally Group By ta_point Order By ta_point which does not change results Select convert(float, ta_point) from tblTally Group By ta_point Order By ta_point which does not work How do I do this to get: 1 2 10 21 Thanks Mad Ape
How about something like this: SELECT CONVERT(float, ta_point) AS SortPoint from tblTally ORDER BY SortPoint -- Erik Ejlskov Jensen, Mobile App Dev MCTS Check out my SQL Compact blog at http://erikej.blogspot.com "The Mad Ape" wrote in message news:c5b2040e-0997-439a-8553-f359ca9254be@n20g2000hsh.googlegroups.com... >I have this SQL: > > Select ta_point from tblTally Group By ta_point > > which gives: > > 1 > 10 > 2 > 21 > > etc > > All values are numeric but it is a NVARCHAR field. > > I tried: > > Select ta_point from tblTally Group By ta_point Order By ta_point > which does not change results > > Select convert(float, ta_point) from tblTally Group By ta_point Order > By ta_point which does not work > > How do I do this to get: > > 1 > 2 > 10 > 21 > > Thanks > > Mad Ape
On Feb 4, 12:59 pm, "ErikEJ" wrote: > How about something like this: > > SELECT CONVERT(float, ta_point) AS SortPoint from tblTally ORDER BY > SortPoint > -- > Erik Ejlskov Jensen, Mobile App Dev MCTS > Check out my SQL Compact blog athttp://erikej.blogspot.com It works great. Thanks. The Mad Ape www.tatumba.com