SQL Server: Eliminate scientific notation, show full decimal format

Description of the problem: There is a Float field in the database table. After being stored in the DB, the numbers are stored in the scientific notation format. Now want to display the complete number in the HTML page.

 

SQL: 

select replace(rtrim(replace(convert(varchar,cast( field name as decimal(38,28))),'0',' ')),' ','0') AS alias from table name

 

First, convert the data to be checked into Decimal type and keep it to 28 digits after the decimal point. If the number of digits is insufficient, it will be displayed as 0. Then remove the invalid trailing 0. Problem solved .

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326645314&siteId=291194637