I have a view in SQL Server with a mixture of INTEGER
, STRING
and DECIMAL
columns.
When I use
SELECT *
FROM [VIEW]
FOR XML RAW
the INTEGER
and DECIMAL
columns get incorrectly converted to a scientific notation value like 2.400000000000000e+001
where it should be simply 24
for the integer column.
If I manually convert the column like
CAST([column] AS VARCHAR(128))
then this doesn't happen. But what if I only know the name of this one column and the remaining numerical values need to be DECIMAL(32, 10)
?