<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>When the obvious answer is obviously wrong</title><link>http://sqlblog.com/blogs/john_paul_cook/archive/2011/03/09/when-the-obvious-answer-is-obviously-wrong.aspx</link><description>This post is about how simple math in T-SQL can produce undesirable results, but first we begin with a math quiz. Answer the following as quickly as possible: You just read pages 100-300 of a book. How many pages did you read? QUICKLY NOW! For those of</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: When the obvious answer is obviously wrong</title><link>http://sqlblog.com/blogs/john_paul_cook/archive/2011/03/09/when-the-obvious-answer-is-obviously-wrong.aspx#34056</link><pubDate>Thu, 10 Mar 2011 18:52:18 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:34056</guid><dc:creator>MarcShapiro</dc:creator><description>&lt;p&gt;I think the last computation is simpler as&lt;/p&gt;
&lt;p&gt;( (n.amount - nMinus1.amount) / ABS(nMinus1.amount) ) * 100&lt;/p&gt;
</description></item><item><title>re: When the obvious answer is obviously wrong</title><link>http://sqlblog.com/blogs/john_paul_cook/archive/2011/03/09/when-the-obvious-answer-is-obviously-wrong.aspx#34170</link><pubDate>Tue, 15 Mar 2011 21:21:33 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:34170</guid><dc:creator>Leonid</dc:creator><description>&lt;p&gt;Is there a chance that nMinus1.amount=0?&lt;/p&gt;
</description></item></channel></rss>