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
Post a Comment