<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Difference and Explanation among DECIMAL, FLOAT and NUMERIC</title>
	<atom:link href="http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 10 Feb 2012 04:35:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Bryan Duchesne</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-242221</link>
		<dc:creator><![CDATA[Bryan Duchesne]]></dc:creator>
		<pubDate>Sun, 22 Jan 2012 13:05:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-242221</guid>
		<description><![CDATA[I have a SQL procedure using OPENROWSET to import MS Foxpro data into a SQL table.   When I run the procedure, I am getting errors on all my numeric field in the Foxpro table.    What appears to be happening is if the DBF integer field is defined as 6,0 and contains 6 digits, it errors out.  If less than 6 digits, it is fine.   I thought I read somewhere that this is caused by a difference in the way that SQL treats numeric data over the way Foxpro does.  Aside from physically changing the data definition in Foxpro (which I cannot do as the data I am importing is from a 3rd party program), is there any way to fix this problem?]]></description>
		<content:encoded><![CDATA[<p>I have a SQL procedure using OPENROWSET to import MS Foxpro data into a SQL table.   When I run the procedure, I am getting errors on all my numeric field in the Foxpro table.    What appears to be happening is if the DBF integer field is defined as 6,0 and contains 6 digits, it errors out.  If less than 6 digits, it is fine.   I thought I read somewhere that this is caused by a difference in the way that SQL treats numeric data over the way Foxpro does.  Aside from physically changing the data definition in Foxpro (which I cannot do as the data I am importing is from a 3rd party program), is there any way to fix this problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231912</link>
		<dc:creator><![CDATA[George]]></dc:creator>
		<pubDate>Thu, 05 Jan 2012 16:28:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231912</guid>
		<description><![CDATA[Did you ever receive a reply on this?  Your problem is with your precision.  there are five digits of precision.  When you first divide by 1,000, you are moving the decimal point three positions to the left.  Then, working back five spots from this new position, you only have two of your original decimal points left for precision.  This would work correctly if you had decimal(38,8).

12345678910111213.14151 / 1000 ==&gt; 12345678910111.213141
when you multiply that by your 1000 again, the decimal moves those three spots back to the right.]]></description>
		<content:encoded><![CDATA[<p>Did you ever receive a reply on this?  Your problem is with your precision.  there are five digits of precision.  When you first divide by 1,000, you are moving the decimal point three positions to the left.  Then, working back five spots from this new position, you only have two of your original decimal points left for precision.  This would work correctly if you had decimal(38,8).</p>
<p>12345678910111213.14151 / 1000 ==&gt; 12345678910111.213141<br />
when you multiply that by your 1000 again, the decimal moves those three spots back to the right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Khan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231207</link>
		<dc:creator><![CDATA[Khan]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 11:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231207</guid>
		<description><![CDATA[Hi madhivanan,

the below scripts works well.

select distinct substring(expiry,1,charindex(&#039;,&#039;,expiry)-1),substring(expiry,charindex(&#039;,&#039;,expiry),len(expiry)) 
from Rec_Dtl where grn_number =27964 and m_code =&#039;M605&#039;

and results.

                                                              
------------------------------ ------------------------------ 
#3453453                       ,$21-12-2014
#S4345                           ,$4YRS

but i don&#039;t want comma infront of 2nd column, like ,$21-12-2014  i need only $21-12-2014    without comma

Thanks a lot for your support. May i have your email id please.

Regards,]]></description>
		<content:encoded><![CDATA[<p>Hi madhivanan,</p>
<p>the below scripts works well.</p>
<p>select distinct substring(expiry,1,charindex(&#8216;,&#8217;,expiry)-1),substring(expiry,charindex(&#8216;,&#8217;,expiry),len(expiry))<br />
from Rec_Dtl where grn_number =27964 and m_code =&#8217;M605&#8242;</p>
<p>and results.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
#3453453                       ,$21-12-2014<br />
#S4345                           ,$4YRS</p>
<p>but i don&#8217;t want comma infront of 2nd column, like ,$21-12-2014  i need only $21-12-2014    without comma</p>
<p>Thanks a lot for your support. May i have your email id please.</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231148</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 09:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231148</guid>
		<description><![CDATA[Do all values have ; as part of it? If not you may need to use different logic. Replace all comma into semicolon before running the code



select substring(expiry,1,charindex(‘;’,expiry)-1),substring(expiry,charindex(‘;’,expiry),len(expiry))
from (select distinct replace(expiry,&#039;,&#039;,&#039;;&#039;)) as expiry from Rec_Dtl where grn_number =27964 and m_code =’M605′) as t]]></description>
		<content:encoded><![CDATA[<p>Do all values have ; as part of it? If not you may need to use different logic. Replace all comma into semicolon before running the code</p>
<p>select substring(expiry,1,charindex(‘;’,expiry)-1),substring(expiry,charindex(‘;’,expiry),len(expiry))<br />
from (select distinct replace(expiry,&#8217;,',&#8217;;')) as expiry from Rec_Dtl where grn_number =27964 and m_code =’M605′) as t</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Khan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231141</link>
		<dc:creator><![CDATA[Khan]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 09:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231141</guid>
		<description><![CDATA[HI madhivan,

i adjust the script whic you&#039;ve given. like below

select distinct substring(expiry,1,charindex(&#039;;&#039;,expiry)-1),substring(expiry,charindex(&#039;;&#039;,expiry),len(expiry)) 
from Rec_Dtl where grn_number =27964 and m_code =&#039;M605&#039;

but know i have this error

Server: Msg 536, Level 16, State 3, Line 1
Invalid length parameter passed to the substring function.

Thanks,]]></description>
		<content:encoded><![CDATA[<p>HI madhivan,</p>
<p>i adjust the script whic you&#8217;ve given. like below</p>
<p>select distinct substring(expiry,1,charindex(&#8216;;&#8217;,expiry)-1),substring(expiry,charindex(&#8216;;&#8217;,expiry),len(expiry))<br />
from Rec_Dtl where grn_number =27964 and m_code =&#8217;M605&#8242;</p>
<p>but know i have this error</p>
<p>Server: Msg 536, Level 16, State 3, Line 1<br />
Invalid length parameter passed to the substring function.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Khan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231107</link>
		<dc:creator><![CDATA[Khan]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 08:17:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231107</guid>
		<description><![CDATA[Hi Madhivanan,

i have this error 

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near &#039;expiry&#039;.


please help.

Thanks,]]></description>
		<content:encoded><![CDATA[<p>Hi Madhivanan,</p>
<p>i have this error </p>
<p>Server: Msg 170, Level 15, State 1, Line 1<br />
Line 1: Incorrect syntax near &#8216;expiry&#8217;.</p>
<p>please help.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231102</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 08:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-231102</guid>
		<description><![CDATA[Split it using substring

select substring(expiry,1,charindex(&#039;;&#039;,expiry)-1),substring(expiry,charindex(&#039;;&#039;,expiry),len(expiry))  from Rec_Dtl where grn_number =27964 and m_code =’M605′]]></description>
		<content:encoded><![CDATA[<p>Split it using substring</p>
<p>select substring(expiry,1,charindex(&#8216;;&#8217;,expiry)-1),substring(expiry,charindex(&#8216;;&#8217;,expiry),len(expiry))  from Rec_Dtl where grn_number =27964 and m_code =’M605′</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Khan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-230043</link>
		<dc:creator><![CDATA[Khan]]></dc:creator>
		<pubDate>Mon, 02 Jan 2012 13:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-230043</guid>
		<description><![CDATA[I HAVE THE BELOW SCRIPT

select DISTINCT expiry from Rec_Dtl where grn_number =27964 and m_code =’M605′

THE RERSUTLS ARE

exiry
——-
 382268; 07/02/05
976131, 31/05/2011

I WANT THE SEPRATE TWO VALUES LIKE BELOW.

DISTINCT EXPIRY 1 , EXPRIY 2
————————————-
                  382268      07/02/05
                  976131     31/05/2011

I WANT RESULTS EXACTLY LIKE ABOVE. PLEASE HELP ME.]]></description>
		<content:encoded><![CDATA[<p>I HAVE THE BELOW SCRIPT</p>
<p>select DISTINCT expiry from Rec_Dtl where grn_number =27964 and m_code =’M605′</p>
<p>THE RERSUTLS ARE</p>
<p>exiry<br />
——-<br />
 382268; 07/02/05<br />
976131, 31/05/2011</p>
<p>I WANT THE SEPRATE TWO VALUES LIKE BELOW.</p>
<p>DISTINCT EXPIRY 1 , EXPRIY 2<br />
————————————-<br />
                  382268      07/02/05<br />
                  976131     31/05/2011</p>
<p>I WANT RESULTS EXACTLY LIKE ABOVE. PLEASE HELP ME.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manish</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-230024</link>
		<dc:creator><![CDATA[manish]]></dc:creator>
		<pubDate>Mon, 02 Jan 2012 12:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-230024</guid>
		<description><![CDATA[No, its correct, suppose I need to have values like .25]]></description>
		<content:encoded><![CDATA[<p>No, its correct, suppose I need to have values like .25</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heber Dijks</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-181646</link>
		<dc:creator><![CDATA[Heber Dijks]]></dc:creator>
		<pubDate>Fri, 21 Oct 2011 15:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-181646</guid>
		<description><![CDATA[Comparison of floating point values in SQL Server not always gives the expected result.

With this function, comparison is done only on the first 15 significant digits. Since SQL Server only garantees a precision of 15 digits for float datatypes, this is expected to be secure.

The function expects two inputs of default type float, that&#039;s an implicit float(53)

See http://floatequalsfloat.codeplex.com for the function]]></description>
		<content:encoded><![CDATA[<p>Comparison of floating point values in SQL Server not always gives the expected result.</p>
<p>With this function, comparison is done only on the first 15 significant digits. Since SQL Server only garantees a precision of 15 digits for float datatypes, this is expected to be secure.</p>
<p>The function expects two inputs of default type float, that&#8217;s an implicit float(53)</p>
<p>See <a href="http://floatequalsfloat.codeplex.com" rel="nofollow">http://floatequalsfloat.codeplex.com</a> for the function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brylle</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-152294</link>
		<dc:creator><![CDATA[brylle]]></dc:creator>
		<pubDate>Mon, 01 Aug 2011 12:01:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-152294</guid>
		<description><![CDATA[Hi, i&#039;m creating a trigger that checks the sum of a column if it is equal to 1.

here&#039;s my query:

DECLARE @subtotal as numeric(19,5)
SET @subtotal = 0.00000

SELECT @subtotal = @subtotal+(SELECT CAST(ROUND(SUM(BaseQty),5) as NUMERIC(19,5)) FROM INSERTED WHERE Table1.ID = INSERTED.ID) FROM Table1 WHERE Table1.ID IN (SELECT DISTINCT ID FROM INSERTED)

IF (@subtotal &gt; 1.00000)
	BEGIN
		RAISERROR (&#039;Formulation is not equal to 1..&#039;, 16, 10)
	END

if the subtotal returns 1.4 and higher the result is true, but if subtotal is equal to 1.3, 1.2, 1.1 it returns false..

can anybody tell me whats wrong with the query.?


Thanks..]]></description>
		<content:encoded><![CDATA[<p>Hi, i&#8217;m creating a trigger that checks the sum of a column if it is equal to 1.</p>
<p>here&#8217;s my query:</p>
<p>DECLARE @subtotal as numeric(19,5)<br />
SET @subtotal = 0.00000</p>
<p>SELECT @subtotal = @subtotal+(SELECT CAST(ROUND(SUM(BaseQty),5) as NUMERIC(19,5)) FROM INSERTED WHERE Table1.ID = INSERTED.ID) FROM Table1 WHERE Table1.ID IN (SELECT DISTINCT ID FROM INSERTED)</p>
<p>IF (@subtotal &gt; 1.00000)<br />
	BEGIN<br />
		RAISERROR (&#8216;Formulation is not equal to 1..&#8217;, 16, 10)<br />
	END</p>
<p>if the subtotal returns 1.4 and higher the result is true, but if subtotal is equal to 1.3, 1.2, 1.1 it returns false..</p>
<p>can anybody tell me whats wrong with the query.?</p>
<p>Thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: venkatesh</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-149549</link>
		<dc:creator><![CDATA[venkatesh]]></dc:creator>
		<pubDate>Wed, 20 Jul 2011 07:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-149549</guid>
		<description><![CDATA[The numeric data type can store a maximum of 38 digits, all of which can be to the right of the decimal point. The numeric data type stores an exact representation of the number; there is no approximation of the stored value.]]></description>
		<content:encoded><![CDATA[<p>The numeric data type can store a maximum of 38 digits, all of which can be to the right of the decimal point. The numeric data type stores an exact representation of the number; there is no approximation of the stored value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bala</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-148184</link>
		<dc:creator><![CDATA[bala]]></dc:creator>
		<pubDate>Thu, 14 Jul 2011 05:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-148184</guid>
		<description><![CDATA[Hi, i have problem with rounding float data types. I am not getting rounded value correctly. For example when i run this,

declare 
    @vtest1 float(53),
    @vtest2 float(53)
begin
    SET @vtest1 = 4551.935
    SET @vtest2 = 759.935
    
    SET @vtest1 = ROUND(@vtest1,2)
    SET @vtest2 = ROUND(@vtest2,2)
    
    
    print replace(rtrim(replace(ltrim(str(Cast(@vtest1 as float),25, 8)),&#039;0&#039;,&#039; &#039;)),&#039; &#039;,&#039;0&#039;)
    print replace(rtrim(replace(ltrim(str(Cast(@vtest2 as float),25, 8)),&#039;0&#039;,&#039; &#039;)),&#039; &#039;,&#039;0&#039;)
end 

Output is

4551.94
759.93

Can anyone explain me why there is difference in decimal (.93 vs .94). In both case i am expecting .94. How i can achieve this without changing float to numeric or decimal?

Thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi, i have problem with rounding float data types. I am not getting rounded value correctly. For example when i run this,</p>
<p>declare<br />
    @vtest1 float(53),<br />
    @vtest2 float(53)<br />
begin<br />
    SET @vtest1 = 4551.935<br />
    SET @vtest2 = 759.935</p>
<p>    SET @vtest1 = ROUND(@vtest1,2)<br />
    SET @vtest2 = ROUND(@vtest2,2)</p>
<p>    print replace(rtrim(replace(ltrim(str(Cast(@vtest1 as float),25, 8)),&#8217;0&#8242;,&#8217; &#8216;)),&#8217; &#8216;,&#8217;0&#8242;)<br />
    print replace(rtrim(replace(ltrim(str(Cast(@vtest2 as float),25, 8)),&#8217;0&#8242;,&#8217; &#8216;)),&#8217; &#8216;,&#8217;0&#8242;)<br />
end </p>
<p>Output is</p>
<p>4551.94<br />
759.93</p>
<p>Can anyone explain me why there is difference in decimal (.93 vs .94). In both case i am expecting .94. How i can achieve this without changing float to numeric or decimal?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hitesh</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-148006</link>
		<dc:creator><![CDATA[Hitesh]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 14:23:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-148006</guid>
		<description><![CDATA[Dear madhivanan

This is working fine now, you saved my work.

Thanks a lot]]></description>
		<content:encoded><![CDATA[<p>Dear madhivanan</p>
<p>This is working fine now, you saved my work.</p>
<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-147993</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 13:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-147993</guid>
		<description><![CDATA[If you are doing it vai zizard, you need to enable this setting. Refer this fpr more informations
http://beyondrelational.com/blogs/madhivanan/archive/2011/06/06/exploring-ssms-enabling-save-changes.aspx]]></description>
		<content:encoded><![CDATA[<p>If you are doing it vai zizard, you need to enable this setting. Refer this fpr more informations<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2011/06/06/exploring-ssms-enabling-save-changes.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2011/06/06/exploring-ssms-enabling-save-changes.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hitesh</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-147906</link>
		<dc:creator><![CDATA[Hitesh]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 05:43:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-147906</guid>
		<description><![CDATA[Hi

I have one problem while altering column datatype from Numeric to Integer. When I tried to alter it then its prompted with message &quot;You should have to re-create the table to change etc...&quot;. Also, earlier my database was running on sql server 2005 and now it is running on 2008.

Please help me to solve this problem

Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I have one problem while altering column datatype from Numeric to Integer. When I tried to alter it then its prompted with message &#8220;You should have to re-create the table to change etc&#8230;&#8221;. Also, earlier my database was running on sql server 2005 and now it is running on 2008.</p>
<p>Please help me to solve this problem</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rakesh</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-138586</link>
		<dc:creator><![CDATA[rakesh]]></dc:creator>
		<pubDate>Fri, 03 Jun 2011 06:03:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-138586</guid>
		<description><![CDATA[First argument should be total no.of digits and the second one is precision.
i.e decimal(3,2) allows 1.12 and decimal(2,1) allows 1.1]]></description>
		<content:encoded><![CDATA[<p>First argument should be total no.of digits and the second one is precision.<br />
i.e decimal(3,2) allows 1.12 and decimal(2,1) allows 1.1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-112441</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 21 Jan 2011 10:35:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-112441</guid>
		<description><![CDATA[select floor(10056.39+0.50),floor(10056.67+0.50)]]></description>
		<content:encoded><![CDATA[<p>select floor(10056.39+0.50),floor(10056.67+0.50)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ABID</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-112080</link>
		<dc:creator><![CDATA[ABID]]></dc:creator>
		<pubDate>Wed, 19 Jan 2011 14:40:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-112080</guid>
		<description><![CDATA[I have values in my table 13123.84,10056.39,11441.98

know my condition if decimal less than .50 then 10056 if greater than .50 then 10057. in sql server 2000. how i can get this results?

please help me.]]></description>
		<content:encoded><![CDATA[<p>I have values in my table 13123.84,10056.39,11441.98</p>
<p>know my condition if decimal less than .50 then 10056 if greater than .50 then 10057. in sql server 2000. how i can get this results?</p>
<p>please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jag</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109569</link>
		<dc:creator><![CDATA[Jag]]></dc:creator>
		<pubDate>Wed, 05 Jan 2011 13:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109569</guid>
		<description><![CDATA[Expected results:

0 = 0:00
2 = 2:00
8.3 = 8:30]]></description>
		<content:encoded><![CDATA[<p>Expected results:</p>
<p>0 = 0:00<br />
2 = 2:00<br />
8.3 = 8:30</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jag</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109566</link>
		<dc:creator><![CDATA[Jag]]></dc:creator>
		<pubDate>Wed, 05 Jan 2011 13:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109566</guid>
		<description><![CDATA[These are some of the float values in a column:

0
2
8.3  -- Which should equal 8:30 after converting to datetime]]></description>
		<content:encoded><![CDATA[<p>These are some of the float values in a column:</p>
<p>0<br />
2<br />
8.3  &#8212; Which should equal 8:30 after converting to datetime</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109563</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 05 Jan 2011 13:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109563</guid>
		<description><![CDATA[Post some sample data with expected result]]></description>
		<content:encoded><![CDATA[<p>Post some sample data with expected result</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jag</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109562</link>
		<dc:creator><![CDATA[Jag]]></dc:creator>
		<pubDate>Wed, 05 Jan 2011 12:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109562</guid>
		<description><![CDATA[My last comment had the wrong email address.

Using SQL Server 2005 i am trying to convert float values to datetime or time types.

Can anyone help?]]></description>
		<content:encoded><![CDATA[<p>My last comment had the wrong email address.</p>
<p>Using SQL Server 2005 i am trying to convert float values to datetime or time types.</p>
<p>Can anyone help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jag</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109560</link>
		<dc:creator><![CDATA[Jag]]></dc:creator>
		<pubDate>Wed, 05 Jan 2011 12:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-109560</guid>
		<description><![CDATA[Using SQL Server 2005 i am trying to convert float values to datetime or time types.

Can anyone help?]]></description>
		<content:encoded><![CDATA[<p>Using SQL Server 2005 i am trying to convert float values to datetime or time types.</p>
<p>Can anyone help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kamini</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-104582</link>
		<dc:creator><![CDATA[kamini]]></dc:creator>
		<pubDate>Fri, 10 Dec 2010 10:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-104582</guid>
		<description><![CDATA[Hi

I have one problem..please give me solution..it&#039;s urgent

DECLARE @data real
SET @data =9.660606E+07
declare @value varchar
set @value = cast (cast(@data as decimal) as varchar)
select @value
SELECT
      CASE
              WHEN CHARINDEX(&#039;E&#039;, @data) &gt; 0 THEN CAST(LEFT(@data,
CHARINDEX(&#039;E&#039;, @data) - 1) AS FLOAT) * POWER(10.0, CAST(RIGHT(@data,
CHARINDEX(&#039;E&#039;, REVERSE(@data)) - 1) AS INT))
              ELSE CAST(@data AS BIGINT)
      END
run this in sqlserver

actual value 9.660606E+07 is 96606060
but return 96606100
i want exact value 96606060
if you take decimal type instead of real..then run fine but 

The value from database comes is real type]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I have one problem..please give me solution..it&#8217;s urgent</p>
<p>DECLARE @data real<br />
SET @data =9.660606E+07<br />
declare @value varchar<br />
set @value = cast (cast(@data as decimal) as varchar)<br />
select @value<br />
SELECT<br />
      CASE<br />
              WHEN CHARINDEX(&#8216;E&#8217;, @data) &gt; 0 THEN CAST(LEFT(@data,<br />
CHARINDEX(&#8216;E&#8217;, @data) &#8211; 1) AS FLOAT) * POWER(10.0, CAST(RIGHT(@data,<br />
CHARINDEX(&#8216;E&#8217;, REVERSE(@data)) &#8211; 1) AS INT))<br />
              ELSE CAST(@data AS BIGINT)<br />
      END<br />
run this in sqlserver</p>
<p>actual value 9.660606E+07 is 96606060<br />
but return 96606100<br />
i want exact value 96606060<br />
if you take decimal type instead of real..then run fine but </p>
<p>The value from database comes is real type</p>
]]></content:encoded>
	</item>
</channel>
</rss>

