• Ray Herring (3/24/2015)


    Here are a couple of things to consider.

    When SQL2005 introduced VarChar(max) I encouraged Devs to adopt the new data type immediately and most did. Eventually, we decided to script the column data type change from Text to Varchar(max). We applied the change and about 100 or so columns were changed in a few minutes.

    Unfortunately, it turns out that BCP looked at Varchar(max) and Text differently. A couple of weeks later we found that literally dozens of routines had to be reworked to make BCP treat the new data correctly.

    I disagree with the prohibition against Float and note that if you decide you must get rid of Float you will also have to handle Real. IMHO, Float/Real are powerful tools that a competent computer scientist must understand and know how/when to use. Like GUIDs, Cursors, and triggers; Float is not inherently bad, but it is often misused, abused, and misunderstood. In fact, IMHO both of the URLs you provide demonstrate that lack of understanding. For example "Decimal/Numeric is Fixed-Precision data type, which means that all the values in the data type reane can be represented exactly with precision and scale. "(sic). This is simply not true. Every number base we commonly use has an infinite number of "irrational" numbers (e.g. in Base 10 - PI, e, 1/3, ...) that cannot be exactly represented regardless of the number of digits one chooses. And these values crop up constantly in our calculations of Area, Volume, Average, Standard Deviation, Amortization, etc.

    Check out "What Every Computer Scientist Should Know About Floating-Point Arithmetic "

    Don't throw a well designed, well implemented, powerful tool out of your box just because you don't understand how to use it. Take the time to learn its features and own it.

    I agree totally.

    Another question we should be looking at is when will SQL Server provide support for the decimal 64 and decimal 128 (and indeed the binary 128) formats of the current floating point standard (IEEE 754-2008, ISO/IEC/IEEE 60559:2011)? And when will windows run on and fully exploit hardware that supports the current standard? All the usual complaints (that have any basis in facts - most of them don't) about floating point are fully addressed by use of the decimal formats (since those formats can represent the same decimal fractions as can decimal/numeric type), and the 128 bit binary format adds quite a bit to the binary float capability.

    Tom