Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Duncan Pryde
»
Scaled-down SQL
47 posts, Page 1 of 5
1
2
3
4
5
»
»»
Scaled-down SQL
Rate Topic
Display Mode
Topic Options
Author
Message
Duncan Pryde
Duncan Pryde
Posted Saturday, March 19, 2011 12:24 PM
Hall of Fame
Group: General Forum Members
Last Login: Friday, June 14, 2013 2:30 AM
Points: 3,063,
Visits: 1,335
Comments posted to this topic are about the item
Scaled-down SQL
Post #1080873
bitbucket-25253
bitbucket-25253
Posted Sunday, March 20, 2011 8:38 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 1:49 PM
Points: 5,122,
Visits: 20,362
Excellent question and a more than excellent explanation of why the correct answer is what it is.
Thanks -
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1080986
Duncan Pryde
Duncan Pryde
Posted Sunday, March 20, 2011 11:58 AM
Hall of Fame
Group: General Forum Members
Last Login: Friday, June 14, 2013 2:30 AM
Points: 3,063,
Visits: 1,335
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
tilew-948340
tilew-948340
Posted Sunday, March 20, 2011 6:22 PM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Tuesday, April 02, 2013 8:28 PM
Points: 555,
Visits: 2,137
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 10
DECLARE @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 truncate
Why???
Post #1081052
UMG Developer
UMG Developer
Posted Sunday, March 20, 2011 10:46 PM
SSCrazy
Group: General Forum Members
Last Login: Today @ 2:49 PM
Points: 2,163,
Visits: 2,150
Thanks for the question, it really does show why we need to pay close attention to the data types we use.
Post #1081079
Nakul Vachhrajani
Nakul Vachhrajani
Posted Sunday, March 20, 2011 10:53 PM
Ten Centuries
Group: General Forum Members
Last Login: Monday, June 10, 2013 6:56 AM
Points: 1,282,
Visits: 1,613
Excellent question, with an excellent (If I may dare say, better than BOL) explanation!
Have a wonderful day!
Thanks & Regards,
Nakul Vachhrajani.
http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx
Be courteous. Drive responsibly.
Follow me on
Twitter:
@nakulv_sql
Google Plus:
+Nakul
Post #1081080
Koen Verbeeck
Koen Verbeeck
Posted Monday, March 21, 2011 1:31 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 6:30 AM
Points: 9,410,
Visits: 6,495
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
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1081103
Christian Buettner-167247
Christian Buettner-167247
Posted Monday, March 21, 2011 1:53 AM
SSCrazy
Group: General Forum Members
Last Login: Today @ 1:16 AM
Points: 2,547,
Visits: 3,647
Very good question, indeed. +++
Best Regards,
Chris Büttner
Post #1081107
Carlo Romagnano
Carlo Romagnano
Posted Monday, March 21, 2011 2:01 AM
SSCommitted
Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 1,992,
Visits: 1,855
Unbelievable, but true!
Thank you for qotd and a clear explanation!
Post #1081111
paul s-306273
paul s-306273
Posted Monday, March 21, 2011 2:58 AM
Ten Centuries
Group: General Forum Members
Last Login: Wednesday, June 12, 2013 9:12 AM
Points: 1,167,
Visits: 646
Good question - an area often overlooked by developers.
Post #1081121
« Prev Topic
|
Next Topic »
47 posts, Page 1 of 5
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.