SELECT TO_STR(1234567) evaluates to "1.234567e+06" instead of "1234567"

Hi,

while evaluating N1QL I stumbled upon the following behaviour.

SELECT TO_STR(1234567) evaluates to “1.234567e+06” instead ot the expected “1234567”.

I am trying to build a string to use as a document ID like so:
SELECT “X” || TO_STR(1234567)
It evaluates to “X1.234567e+06” instead of the expected “X1234567”.

Is there a work-around?

Best regards
Timo Griese

Hi Timo,

This will be fixed in 4.1.0, with a DP (developer preview) version coming in a few weeks. We will remove the use of scientific notation by default.

Thanks,
Gerald

Hi,

this is great news Gerald :smile:

I am looking forward to test out the new version.

Best regards
Timo