<?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>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Wed, 17 Mar 2010 18:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vishal Jani</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-62807</link>
		<dc:creator>Vishal Jani</dc:creator>
		<pubDate>Fri, 12 Mar 2010 10:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-62807</guid>
		<description>Hi,

In my one project I am facing very strange problem of float.
Using SQL query I am performing average of one float column using group by category column. If category have single brand then it will not produce same average.

e.g. 7 will produce 7.0000000000000009

Please help on this.

Thanks in advance

Regards,
Vishal Jani</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>In my one project I am facing very strange problem of float.<br />
Using SQL query I am performing average of one float column using group by category column. If category have single brand then it will not produce same average.</p>
<p>e.g. 7 will produce 7.0000000000000009</p>
<p>Please help on this.</p>
<p>Thanks in advance</p>
<p>Regards,<br />
Vishal Jani</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-61341</link>
		<dc:creator>Madhivanan</dc:creator>
		<pubDate>Wed, 17 Feb 2010 13:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-61341</guid>
		<description>Pinal, as pointed out at the first two comments decimal(2,4) should be decimal(4,2) as you cant have scale more than that of precision</description>
		<content:encoded><![CDATA[<p>Pinal, as pointed out at the first two comments decimal(2,4) should be decimal(4,2) as you cant have scale more than that of precision</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-60938</link>
		<dc:creator>Pinal Dave</dc:creator>
		<pubDate>Wed, 10 Feb 2010 12:57:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-60938</guid>
		<description>Hello Taduri,

The example you used here (45000 to 450.00) is not a data type conversion but a value change derived from devide by 100.
You can convert a decimal like 45000 to 45000.00 by using below syntax:

CONVERT(DECIMAL (10,2), yourvalue)

Regards,
Pinal Dave</description>
		<content:encoded><![CDATA[<p>Hello Taduri,</p>
<p>The example you used here (45000 to 450.00) is not a data type conversion but a value change derived from devide by 100.<br />
You can convert a decimal like 45000 to 45000.00 by using below syntax:</p>
<p>CONVERT(DECIMAL (10,2), yourvalue)</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taduri Sreedhar</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-60918</link>
		<dc:creator>Taduri Sreedhar</dc:creator>
		<pubDate>Wed, 10 Feb 2010 05:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-60918</guid>
		<description>I want to update  decimal(don&#039;t have scale)  data with scale .
i.e., 45000  it shoul be convert like 450.00 
any help ?</description>
		<content:encoded><![CDATA[<p>I want to update  decimal(don&#8217;t have scale)  data with scale .<br />
i.e., 45000  it shoul be convert like 450.00<br />
any help ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Frissen</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-58974</link>
		<dc:creator>Peter Frissen</dc:creator>
		<pubDate>Thu, 24 Dec 2009 11:37:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-58974</guid>
		<description>Hi, I&#039;m still strugling with multiplying float with numbers as in example below. The first resultset is in type real, the second in type float. In this example my price = 22.23 and the factor 100000. In the real-example the result is correct, but in the float-example I would expect that the result would be 2223000, but it is 2222999.95422363, rounded to 2 decimals it&#039;s 2222999.95. And that&#039;s not correct. Any ideas how to solve this problem? Should I round to 2 or 4 decimals first and then multiply? Is there a general solution?

Thx.

declare @tReal table

(col1 real)

declare @tFloat table

(col1 float)

declare @Factor int

select @Factor = 100000

insert into @tReal values (22.23)

insert into @tFloat select col1 from @tReal

select col1 as Contents,

col1 * @Factor as MultiplyFactor

from @tReal 

select col1 as Contents,

col1 * @Factor as MultiplyFactor

from @tFloat</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m still strugling with multiplying float with numbers as in example below. The first resultset is in type real, the second in type float. In this example my price = 22.23 and the factor 100000. In the real-example the result is correct, but in the float-example I would expect that the result would be 2223000, but it is 2222999.95422363, rounded to 2 decimals it&#8217;s 2222999.95. And that&#8217;s not correct. Any ideas how to solve this problem? Should I round to 2 or 4 decimals first and then multiply? Is there a general solution?</p>
<p>Thx.</p>
<p>declare @tReal table</p>
<p>(col1 real)</p>
<p>declare @tFloat table</p>
<p>(col1 float)</p>
<p>declare @Factor int</p>
<p>select @Factor = 100000</p>
<p>insert into @tReal values (22.23)</p>
<p>insert into @tFloat select col1 from @tReal</p>
<p>select col1 as Contents,</p>
<p>col1 * @Factor as MultiplyFactor</p>
<p>from @tReal </p>
<p>select col1 as Contents,</p>
<p>col1 * @Factor as MultiplyFactor</p>
<p>from @tFloat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-58932</link>
		<dc:creator>Pinal Dave</dc:creator>
		<pubDate>Wed, 23 Dec 2009 05:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-58932</guid>
		<description>Hello Srini,

The size of table could increase because of new data type or because of Fillfactor. The Decimal value with scale upto 9 stores in 5 bytes while float could be taking 8 bytes.

Regards,
Pinal Dave</description>
		<content:encoded><![CDATA[<p>Hello Srini,</p>
<p>The size of table could increase because of new data type or because of Fillfactor. The Decimal value with scale upto 9 stores in 5 bytes while float could be taking 8 bytes.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srini</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-58866</link>
		<dc:creator>Srini</dc:creator>
		<pubDate>Mon, 21 Dec 2009 09:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-58866</guid>
		<description>Hi,

I have a table with 2 million rows. There are four columns of  data type decimal(19,6). The size of the table comes to around 250 MB ( in compressed mode) I created a new table with the columns as float data type and migrated the data. I compressed the table. The size of the table is now around 400 MB. Why is it this way</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have a table with 2 million rows. There are four columns of  data type decimal(19,6). The size of the table comes to around 250 MB ( in compressed mode) I created a new table with the columns as float data type and migrated the data. I compressed the table. The size of the table is now around 400 MB. Why is it this way</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-57673</link>
		<dc:creator>Brian Tkatch</dc:creator>
		<pubDate>Tue, 17 Nov 2009 17:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-57673</guid>
		<description>@naresh

See the nhelp file here: http://msdn.microsoft.com/en-us/library/ms173773.aspx

FLOAT(1-24) uses 4 bytes for storage.
FLOAT(25-53) uses 8 bytes for storage.

Therefore, the range is different.</description>
		<content:encoded><![CDATA[<p>@naresh</p>
<p>See the nhelp file here: <a href="http://msdn.microsoft.com/en-us/library/ms173773.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms173773.aspx</a></p>
<p>FLOAT(1-24) uses 4 bytes for storage.<br />
FLOAT(25-53) uses 8 bytes for storage.</p>
<p>Therefore, the range is different.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naresh</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-57607</link>
		<dc:creator>naresh</dc:creator>
		<pubDate>Fri, 13 Nov 2009 23:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-57607</guid>
		<description>hi Pinal,
Can you tell me what is the difference between float(24) and float(53) or in another words real and float.

as real is float(24) and by default float is float(54)




I am running this sql code in SQL 2005
--=================================
declare @a as float(24)
set @a=0.85
select cast ( @a as float(53))
--=================================

and the result is

    0.850000023841858


Thanks.</description>
		<content:encoded><![CDATA[<p>hi Pinal,<br />
Can you tell me what is the difference between float(24) and float(53) or in another words real and float.</p>
<p>as real is float(24) and by default float is float(54)</p>
<p>I am running this sql code in SQL 2005<br />
&#8211;=================================<br />
declare @a as float(24)<br />
set @a=0.85<br />
select cast ( @a as float(53))<br />
&#8211;=================================</p>
<p>and the result is</p>
<p>    0.850000023841858</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jim bose</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-56215</link>
		<dc:creator>jim bose</dc:creator>
		<pubDate>Mon, 28 Sep 2009 17:11:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-56215</guid>
		<description>you are one man</description>
		<content:encoded><![CDATA[<p>you are one man</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-55145</link>
		<dc:creator>Imran Mohammed</dc:creator>
		<pubDate>Mon, 24 Aug 2009 02:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-55145</guid>
		<description>@Syed

Try converting that values to decimal (38,2) and see if that works... 

If you use numeric or real data types, you see those kind of outputs. 

~ IM.</description>
		<content:encoded><![CDATA[<p>@Syed</p>
<p>Try converting that values to decimal (38,2) and see if that works&#8230; </p>
<p>If you use numeric or real data types, you see those kind of outputs. </p>
<p>~ IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-55131</link>
		<dc:creator>Syed</dc:creator>
		<pubDate>Sun, 23 Aug 2009 09:17:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-55131</guid>
		<description>Hi All
i am selecting a numric value (1260179004)  through cursor and storing in a variable,  when i am reading varaible then i am getting out put in Eponant ie 1.2 E009
, please can i get some idea to get numric values as it is stored in tables</description>
		<content:encoded><![CDATA[<p>Hi All<br />
i am selecting a numric value (1260179004)  through cursor and storing in a variable,  when i am reading varaible then i am getting out put in Eponant ie 1.2 E009<br />
, please can i get some idea to get numric values as it is stored in tables</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tejal Rupera</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-53947</link>
		<dc:creator>Tejal Rupera</dc:creator>
		<pubDate>Wed, 22 Jul 2009 08:52:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-53947</guid>
		<description>Hello Everyone,

I have one column with decimal(18,3) and column contains data like 1.050.

Now at the retrieval time i want data like 1.05 (omit extra 0&#039;s from floating point)

Please help me in this.</description>
		<content:encoded><![CDATA[<p>Hello Everyone,</p>
<p>I have one column with decimal(18,3) and column contains data like 1.050.</p>
<p>Now at the retrieval time i want data like 1.05 (omit extra 0&#8217;s from floating point)</p>
<p>Please help me in this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CodeShark</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-50616</link>
		<dc:creator>CodeShark</dc:creator>
		<pubDate>Tue, 07 Apr 2009 11:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-50616</guid>
		<description>@JAM

You can use datetime datatype for this, and if you are using sqlserver2008 you have time datattype also.Thanks</description>
		<content:encoded><![CDATA[<p>@JAM</p>
<p>You can use datetime datatype for this, and if you are using sqlserver2008 you have time datattype also.Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JAM</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-50357</link>
		<dc:creator>JAM</dc:creator>
		<pubDate>Wed, 01 Apr 2009 12:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-50357</guid>
		<description>Hello Everyone...

what is the best data type to store  number of hours ex.(0.00) is it Numeric/Decimal/Float?

Please advise</description>
		<content:encoded><![CDATA[<p>Hello Everyone&#8230;</p>
<p>what is the best data type to store  number of hours ex.(0.00) is it Numeric/Decimal/Float?</p>
<p>Please advise</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Renwick</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-44201</link>
		<dc:creator>Mike Renwick</dc:creator>
		<pubDate>Thu, 13 Nov 2008 11:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-44201</guid>
		<description>Worth noting:- Numeric is appropriate in many places where money/currency is involved, but float is actually better for percentage columns....

Try this:-
Generate a table, called &quot;Number&quot; with 100 random numbers in it with 4 or more decimal places.

DECLARE @Total numeric(38,10)
SELECT @Total = SUM(Number) from Number

Select SUM(Percentage) FROM 
(
  SELECT Number / @Total as Percentage from 
  Number
) a

This doesn&#039;t give 1.00 as it should...

But this does

Select SUM(Percentage) FROM 
(
  SELECT Convert(float,Number) / convert(float,@Total) as Percentage from 
  Number
) a

This is because although float doesn&#039;t have perfect coverage across all values, it has much higher accuracy than numeric can manage.</description>
		<content:encoded><![CDATA[<p>Worth noting:- Numeric is appropriate in many places where money/currency is involved, but float is actually better for percentage columns&#8230;.</p>
<p>Try this:-<br />
Generate a table, called &#8220;Number&#8221; with 100 random numbers in it with 4 or more decimal places.</p>
<p>DECLARE @Total numeric(38,10)<br />
SELECT @Total = SUM(Number) from Number</p>
<p>Select SUM(Percentage) FROM<br />
(<br />
  SELECT Number / @Total as Percentage from<br />
  Number<br />
) a</p>
<p>This doesn&#8217;t give 1.00 as it should&#8230;</p>
<p>But this does</p>
<p>Select SUM(Percentage) FROM<br />
(<br />
  SELECT Convert(float,Number) / convert(float,@Total) as Percentage from<br />
  Number<br />
) a</p>
<p>This is because although float doesn&#8217;t have perfect coverage across all values, it has much higher accuracy than numeric can manage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dat</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-41702</link>
		<dc:creator>dat</dc:creator>
		<pubDate>Fri, 15 Aug 2008 14:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-41702</guid>
		<description>I just migrate my database from sql 2000 to sql 2005 and ran a test for writing data to dbf file (ms foxpro). The data in sql is ‘float’
for ex. 4000. but when this data is writen to dbf the format change to 4,000.00. this is a problem because now my dbf database see it as 4 instead of 4000. This is a major concern since we are dealing with inventory.

I’ve been looking in the net for a solution but haven’t came accross one yet.
Any suggestion on how I can fix this?

Thank you in advance for your help</description>
		<content:encoded><![CDATA[<p>I just migrate my database from sql 2000 to sql 2005 and ran a test for writing data to dbf file (ms foxpro). The data in sql is ‘float’<br />
for ex. 4000. but when this data is writen to dbf the format change to 4,000.00. this is a problem because now my dbf database see it as 4 instead of 4000. This is a major concern since we are dealing with inventory.</p>
<p>I’ve been looking in the net for a solution but haven’t came accross one yet.<br />
Any suggestion on how I can fix this?</p>
<p>Thank you in advance for your help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kray</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-35270</link>
		<dc:creator>Kray</dc:creator>
		<pubDate>Tue, 22 Apr 2008 01:48:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-35270</guid>
		<description>To be even more precise [pun unintended :)], 
the first argument is &#039;precision&#039;, i.e. the number of significant digits, which includes both the digits to the left and to the right of the decimal point.
the second argument is the &#039;scale&#039;, i.e. the number of digits to the right of the decimal point.

So Rumtata and Jyothi are both correct about the DECIMAL(4,2) and DECIMAL(6,4).</description>
		<content:encoded><![CDATA[<p>To be even more precise [pun unintended :)],<br />
the first argument is &#8216;precision&#8217;, i.e. the number of significant digits, which includes both the digits to the left and to the right of the decimal point.<br />
the second argument is the &#8217;scale&#8217;, i.e. the number of digits to the right of the decimal point.</p>
<p>So Rumtata and Jyothi are both correct about the DECIMAL(4,2) and DECIMAL(6,4).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clark</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-35254</link>
		<dc:creator>Clark</dc:creator>
		<pubDate>Mon, 21 Apr 2008 19:07:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-35254</guid>
		<description>we have a table with fields listed as float (8). i notice though some of values are stored as 3.4 and others are stored as 3.3999999999. can you explain why a number, if input as 3.4 would be stored as 3.3999999999? thanks.</description>
		<content:encoded><![CDATA[<p>we have a table with fields listed as float (8). i notice though some of values are stored as 3.4 and others are stored as 3.3999999999. can you explain why a number, if input as 3.4 would be stored as 3.3999999999? thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayasankar</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-34115</link>
		<dc:creator>Jayasankar</dc:creator>
		<pubDate>Tue, 04 Mar 2008 16:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-34115</guid>
		<description>Hi . Some issues.

I have a table with a Real data type column and another one with float data type column.


table1 - real data type
table2 - float data type

insert into table1 values ( 22.22 )

insert into table2 select  from table1

The value in table2 should have been 22.22 . But am getting some junk value in decimal part . Is this by design for SQL Server 2005 ?

Can anybody throw some light into this issue ? Thanks a lot for your time. 

Regards,
Jay</description>
		<content:encoded><![CDATA[<p>Hi . Some issues.</p>
<p>I have a table with a Real data type column and another one with float data type column.</p>
<p>table1 &#8211; real data type<br />
table2 &#8211; float data type</p>
<p>insert into table1 values ( 22.22 )</p>
<p>insert into table2 select  from table1</p>
<p>The value in table2 should have been 22.22 . But am getting some junk value in decimal part . Is this by design for SQL Server 2005 ?</p>
<p>Can anybody throw some light into this issue ? Thanks a lot for your time. </p>
<p>Regards,<br />
Jay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Akash</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-15346</link>
		<dc:creator>Akash</dc:creator>
		<pubDate>Mon, 15 Oct 2007 04:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-15346</guid>
		<description>Good One</description>
		<content:encoded><![CDATA[<p>Good One</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jyothi</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-12339</link>
		<dc:creator>Jyothi</dc:creator>
		<pubDate>Thu, 13 Sep 2007 09:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-12339</guid>
		<description>It should be DECIMAL(4,2) and DECIMAL(6,4).
First arg is total no.of digits and the second is the precision...
-Jyothi</description>
		<content:encoded><![CDATA[<p>It should be DECIMAL(4,2) and DECIMAL(6,4).<br />
First arg is total no.of digits and the second is the precision&#8230;<br />
-Jyothi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rumtata</title>
		<link>http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-10212</link>
		<dc:creator>Rumtata</dc:creator>
		<pubDate>Thu, 30 Aug 2007 07:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/29/sql-server-difference-and-explanation-among-decimal-float-and-numeric/#comment-10212</guid>
		<description>Hi,

just read your actual blog entry and found some typo:
You wrote &quot;DECIMAL(2,4)&quot; - I think you mean &quot;DECIMAL(4,2)&quot;...

Rumtata</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>just read your actual blog entry and found some typo:<br />
You wrote &#8220;DECIMAL(2,4)&#8221; &#8211; I think you mean &#8220;DECIMAL(4,2)&#8221;&#8230;</p>
<p>Rumtata</p>
]]></content:encoded>
	</item>
</channel>
</rss>
