﻿<?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 2008 / T-SQL (SS2K8)  / Arithmetic overflow error converting numeric to data type numeric / 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 16:15:38 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Arithmetic overflow error converting numeric to data type numeric</title><link>http://www.sqlservercentral.com/Forums/Topic1369656-392-1.aspx</link><description>[quote][b]hoseam (10/8/2012)[/b][hr]HiI have this code:SELECT  [Policy_Id] = SNAP.POLICY_ID ,[Mex_Id] = FR.INV_PTF_NAME,[Rebate_Amount_Gross] = ISNULL(CONVERT(DECIMAL(6,2),((FR.REBATE_RATE * SNAP.TOTAL_UNITS)/100)), 0.00)and I get this error:Arithmetic overflow error converting numeric to data type numeric.please help.[/quote]Examine the Rebate_Amount_Gross values and check for yourself if they will fit into a decimal (6,2);[code="sql"]SELECT 	[Policy_Id] = SNAP.POLICY_ID 	,[Mex_Id] = FR.INV_PTF_NAME	,x.[Rebate_Amount_Gross]FROM ...CROSS APPLY (SELECT [Rebate_Amount_Gross] = (FR.REBATE_RATE * SNAP.TOTAL_UNITS)/100) xORDER BY x.[Rebate_Amount_Gross] DESC[/code]</description><pubDate>Mon, 08 Oct 2012 02:58:41 GMT</pubDate><dc:creator>ChrisM@Work</dc:creator></item><item><title>Arithmetic overflow error converting numeric to data type numeric</title><link>http://www.sqlservercentral.com/Forums/Topic1369656-392-1.aspx</link><description>HiI have this code:SELECT  [Policy_Id] = SNAP.POLICY_ID ,[Mex_Id] = FR.INV_PTF_NAME,[Rebate_Amount_Gross] = ISNULL(CONVERT(DECIMAL(6,2),((FR.REBATE_RATE * SNAP.TOTAL_UNITS)/100)), 0.00)and I get this error:Arithmetic overflow error converting numeric to data type numeric.please help.</description><pubDate>Mon, 08 Oct 2012 01:53:29 GMT</pubDate><dc:creator>hoseam</dc:creator></item></channel></rss>