sql server - SQL 'float' data type, when output as XML, causes undesired float result -


you can try simply: table1: has column1 of type 'float' instead of

select column1 table1; gives values seen in table.

say returns 15.1

however, if try

select column1 table1  xml path('table1'), root('someroot'), type   

returns: 1.510000000000000e+001

has seen this, , how fixed? in advance :)

this when work floating point numbers. can try though:

select convert(varchar(100), cast(column1 decimal(38,2))) 

you need adjust precision on decimal fit needs.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -