﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Burke Crosby  / Conversion / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 20 May 2013 06:57:14 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>Good one!! :-)</description><pubDate>Wed, 19 Dec 2012 04:18:39 GMT</pubDate><dc:creator>kapil_kk</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>[quote][b]bc (10/6/2008)[/b][hr]i hope a few people learned about this "gotcha" that puzzled me when i first came upon it in trying to answer another forum question.  thanks[/quote]As I mentioned, I'd already encountered this before, but I too puzzled over it when I first saw it.Definitely a good question.</description><pubDate>Tue, 07 Oct 2008 10:28:54 GMT</pubDate><dc:creator>Derek Dongray</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>Like many who attempted the question, I got the right answer but possibly for the wrong reason. At first, I though truncation and implicit conversion would occur, but as 600,000 was not offered as pointed out by others, it was a simple process of elimination.I shall have a read of BOL.Good ques.</description><pubDate>Tue, 07 Oct 2008 09:42:07 GMT</pubDate><dc:creator>Preet_S</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>agreed this was an insightful question, well done!</description><pubDate>Mon, 06 Oct 2008 22:26:59 GMT</pubDate><dc:creator>Marius Els</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>[quote][b]bc (10/6/2008)[/b][hr]i had a hard time coming up with false answers that would throw the reader off.  i thought some might misread 50000 for 500000, and thus 150000 (50000+50000+50000).  anyway this was my first attempt at writing a QOD.  i hope a few people learned about this "gotcha" that puzzled me when i first came upon it in trying to answer another forum question.  thanks[/quote]Well, you did catch a few people  - about 9% :) - but if you had made one other choices 600000 (or 500000 as Derek suggests above), I'd say you would have caught closer to 25% combined with one of the wrong answers.Still, you made a great question. You should try posting more of them!webrunner</description><pubDate>Mon, 06 Oct 2008 14:44:56 GMT</pubDate><dc:creator>webrunner</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>i had a hard time coming up with false answers that would throw the reader off.  i thought some might misread 50000 for 500000, and thus 150000 (50000+50000+50000).  anyway this was my first attempt at writing a QOD.  i hope a few people learned about this "gotcha" that puzzled me when i first came upon it in trying to answer another forum question.  thanks</description><pubDate>Mon, 06 Oct 2008 14:40:08 GMT</pubDate><dc:creator>bc_</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>That was a good one...</description><pubDate>Mon, 06 Oct 2008 14:30:10 GMT</pubDate><dc:creator>Nikhil Shikarkhane</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>I got thius right because I'd seen this error before, but also think more people would not have picked up the error if 600000 had been offered as an answer, i.e. 500000+'50000'+'50000'.The other obvious wrong answer would be 500000, i.e. if you assume the truncation occurs to the right i.e. 500000 becomes '00000' (leading '5' dropped) and you then get 500000+'0'+'0'.I'd be interested to see what logic is supposed to arrive at either 15000 or 150000 since I can't see any obvious way to get either of these.</description><pubDate>Mon, 06 Oct 2008 08:05:15 GMT</pubDate><dc:creator>Derek Dongray</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>Thanks, neat question.I'm sure this may not work every time, but I used the process of elimination based on the sums provided as answers.I first assumed that there was no error, and that @first would be 50000 (truncated due to varchar(5)).That led me to get @number + @first + @second = 500000 + 50000 + 50000 = 600000.600000 wasn't one of the sums given as an answer, so I figured I should pick the error as my answer. Had 600000 been an available answer choice, I probably would have picked it and gotten the answer wrong.Just my two cents if you want to make it tougher in the future to guess at the answers.webrunner</description><pubDate>Mon, 06 Oct 2008 07:15:31 GMT</pubDate><dc:creator>webrunner</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>[quote][b]HanShi (10/6/2008)[/b][hr]I thought putting the integer value 500000 into a varchar(5) would result in a string with value '50000' (removed last 0). Now I learned it's resulting in a string with value '*'.Thanks for letting me learn someting new...:w00t:[/quote]this was part of my thinking as well, that the value will just be truncated.....hence i moved on to the following steps and anticipated the error further down the statement list.</description><pubDate>Mon, 06 Oct 2008 06:20:09 GMT</pubDate><dc:creator>Marius Els</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>I thought putting the integer value 500000 into a varchar(5) would result in a string with value '50000' (removed last 0). Now I learned it's resulting in a string with value '*'.Thanks for letting me learn someting new...:w00t:</description><pubDate>Mon, 06 Oct 2008 05:59:18 GMT</pubDate><dc:creator>HanShi</dc:creator></item><item><title>RE: Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>My answer was correct but my reasoning for getting to the answer seemed to have been incorrect; I thought the error would be generated on printing integer and varchar variables together whereby a convert would be required for the int variable.But after reading the explanation to the answer and going through the msdn article, I learned something new. :)</description><pubDate>Mon, 06 Oct 2008 04:24:55 GMT</pubDate><dc:creator>Marius Els</dc:creator></item><item><title>Conversion</title><link>http://www.sqlservercentral.com/Forums/Topic580747-1397-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/T-SQL/64442/"&gt;Conversion&lt;/A&gt;[/B]</description><pubDate>Sat, 04 Oct 2008 13:32:59 GMT</pubDate><dc:creator>bc_</dc:creator></item></channel></rss>