on 2019 Dec 10 7:17 AM
If I run the following SQL from Interactive-SQL on version 16.0.0.2798
begin declare test numeric(4,2); set test = 40.73; select test as testNumeric, string(test) as testString for json raw; end
The result I get is:
forjson(256,'testNumeric',jsontab."1",'testString',jsontab."2") [{"testNumeric":40.729999999999994,"testString":"40.73"}]
How can I get "testNumeric" to be represented as 40.73 in the output?
Request clarification before answering.
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.