Posts
1150
Comments
891
Trackbacks
1
T-SQL : Precision and Rounding

If you've ever wondered why “select 2/3” returns zero, here are two discussions that get into the reasons why:

http://www.windowsitpro.com/sqlserver/forums/messageview.cfm?catid=1690&threadid=128167&STARTPAGE=1

http://support.microsoft.com/kb/q42980/

BTW, “select cast(2 as dec (18,8))/cast(3 as dec (18,8)) “ will return the 'correct' result.

posted on Monday, May 09, 2005 9:36 AM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 2 and 4 and type the answer here: