Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 Scaled-down SQL Rate Topic Display Mode Topic Options
Author
 Message
 Posted Saturday, March 19, 2011 12:24 PM
 Hall of Fame Group: General Forum Members Last Login: Thursday, October 13, 2016 4:04 AM Points: 3,358, Visits: 1,552
Post #1080873
 Posted Sunday, March 20, 2011 8:38 AM
 SSCertifiable Group: General Forum Members Last Login: Sunday, January 4, 2015 7:55 AM Points: 5,333, Visits: 25,280
Post #1080986
 Posted Sunday, March 20, 2011 11:58 AM
 Hall of Fame Group: General Forum Members Last Login: Thursday, October 13, 2016 4:04 AM Points: 3,358, Visits: 1,552
 bitbucket-25253 (3/20/2011)Excellent question and a more than excellent explanation of why the correct answer is what it is.Thanks - high praise indeed! I must mention though, that when trying to decide how to format the explanation, I came across this excellent post from SQL Kiwi (Paul White?) - which helped me considerably to come up with a clearer and more concise one than I would have done otherwise.
Post #1081005
 Posted Sunday, March 20, 2011 6:22 PM
 Mr or Mrs. 500 Group: General Forum Members Last Login: Thursday, May 15, 2014 8:37 PM Points: 589, Visits: 2,437
 I am sorry, but I realy, realy don't understand why D is not good, even if I do your formula. Why is so that D would have a truncate answer and not C? I mean, both have a precision of 51 and only the scale is different (3 more digit more for C), which might explain something if you could explain my question here:If I declare D as precision of 23 instead of 25 and still having a scale of 10DECLARE @value1D DECIMAL(23,10), @value2D DECIMAL(23,10)it is still a precision over 38, and the scale is still 20 as previous, but the answer is not truncateWhy???
Post #1081052
 Posted Sunday, March 20, 2011 10:46 PM
 SSCrazy Group: General Forum Members Last Login: Tuesday, June 30, 2015 9:47 AM Points: 2,160, Visits: 2,204
 Thanks for the question, it really does show why we need to pay close attention to the data types we use.
Post #1081079
 Posted Sunday, March 20, 2011 10:53 PM
 SSCommitted Group: General Forum Members Last Login: Yesterday @ 3:16 AM Points: 1,710, Visits: 2,117
 Excellent question, with an excellent (If I may dare say, better than BOL) explanation!Have a wonderful day! Thanks & Regards,Nakul Vachhrajani.http://nakulvachhrajani.comBe courteous. Drive responsibly.Follow me on Twitter: @sqltwinsGoogle Plus: +Nakul
Post #1081080
 Posted Monday, March 21, 2011 1:31 AM
 SSCoach Group: General Forum Members Last Login: Today @ 7:23 AM Points: 15,506, Visits: 13,168
 Nice question, but a tough one for a Monday How to post forum questions.Need an answer? No, you need a question.What’s the deal with Excel & SSIS?Member of LinkedIn. My blog at SQLKover. MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1081103
 Posted Monday, March 21, 2011 1:53 AM
 SSCrazy Group: General Forum Members Last Login: Tuesday, December 1, 2015 6:09 AM Points: 2,891, Visits: 3,889
 Very good question, indeed. +++ Best Regards, Chris Büttner
Post #1081107
 Posted Monday, March 21, 2011 2:01 AM
 Hall of Fame Group: General Forum Members Last Login: 2 days ago @ 2:28 AM Points: 3,369, Visits: 3,191
 Unbelievable, but true!Thank you for qotd and a clear explanation!
Post #1081111
 Posted Monday, March 21, 2011 2:58 AM
 SSCommitted Group: General Forum Members Last Login: Today @ 8:48 AM Points: 1,718, Visits: 1,032
 Good question - an area often overlooked by developers.
Post #1081121

 Permissions