Overview
Artifact ID: | e0c5eb961e23da448f554f2c00ed2b3d8e7fca0056905f8e4bd2ff4266474f10 |
---|---|
Ticket: | 674385aeba91c774d47736f1aefd259b074dc5d3
CAST('-0.0' AS NUMERIC) computes 0.0 rather than 0 |
User & Date: | mrigger 2019-06-12 14:12:25 |
Changes
- icomment:
I think that what "lossless" mean in this context is up to interpretation. In some sense, all conversions are lossful. For example, both '1.0' and '1' are converted to 1 and it is not possible to determine whether the original string was '1.0' or '1'. <pre> SELECT CAST('1.0' AS NUMERIC); -- 1 SELECT CAST('1' AS NUMERIC); -- 1 </pre>
- login: "mrigger"
- mimetype: "text/x-fossil-wiki"