Posts
493
Comments
417
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

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
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 3 and 5 and type the answer here: