Search code examples
sqlsql-servervarcharscientific-notation

SQL Server 2008 - Alter column to Varchar from Float produces Scientific Notation


I am having to change one of the columns in table which currently is Float to Varchar, but when I use alter command, it stores some of the longer numbers in Scientific Notation.

Can I avoid this?

If not, is there a way to easily update the table later to store the scientific notation as normal integer?

Thanks


Solution

  • Please check the link

    convert float into varchar in SQL server without scientific notation

    You can cast the float to varchar(max)

    How to convert float to varchar in SQL Server