﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / Arithmetic overflow / 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>Fri, 24 May 2013 18:09:36 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Arithmetic overflow</title><link>http://www.sqlservercentral.com/Forums/Topic692812-338-1.aspx</link><description>Thanks kruti, it works.</description><pubDate>Wed, 08 Apr 2009 03:46:43 GMT</pubDate><dc:creator>baumgaertner</dc:creator></item><item><title>RE: Arithmetic overflow</title><link>http://www.sqlservercentral.com/Forums/Topic692812-338-1.aspx</link><description>Try this,select sum(Convert(bigint,datalength(memTest),0))from tblTest</description><pubDate>Wed, 08 Apr 2009 02:26:28 GMT</pubDate><dc:creator>Kruti Kansara</dc:creator></item><item><title>RE: Arithmetic overflow</title><link>http://www.sqlservercentral.com/Forums/Topic692812-338-1.aspx</link><description>Hi,According to BOL, DataLength returns either an int or bigint depending upon the type of the field it is examining. So what is the definition of 'memTest' and how many rows are there?It could be that it is going to return an int, but the accumulated value is too large for such a field.BrainDonor</description><pubDate>Wed, 08 Apr 2009 01:58:08 GMT</pubDate><dc:creator>BrainDonor</dc:creator></item><item><title>Arithmetic overflow</title><link>http://www.sqlservercentral.com/Forums/Topic692812-338-1.aspx</link><description>Hello,when I try the following sql I get an error:[i]select sum(datalength(memTest))from tblTestArithmetic overflow error converting expression to data type int[/i]Has anyone an idea?Thanks.</description><pubDate>Wed, 08 Apr 2009 01:31:12 GMT</pubDate><dc:creator>baumgaertner</dc:creator></item></channel></rss>