Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sort -

Author  Topic 

kingkong
Starting Member

16 Posts

Posted - 2004-10-27 : 06:38:57
If I store the number values in varchar type, and use SQL as following.

Select * from Table order by (Numbr as decimal) ASC

Why 172.2 come before 172?

172.2
172
171
160

nr
SQLTeam MVY

12543 Posts

Posted - 2004-10-27 : 07:10:57
Select * from Table order by (convert(decimal(18,6),Numbr) ASC

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -