The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Reproduced in Interactive SQL 16.0.0, build 2127

ROUND(0.89, 2) = 0.89
ROUND(0.89, 1) = 0.9
ROUND(0.89, 0) = ???????????????????????
ROUND(0.89, 0) * 1 = 1
CAST(ROUND(0.89, 0) AS VARCHAR) = "Cannot convert numeric to a varchar"

asked 01 Mar '16, 07:26

Alex's gravatar image

accept rate: 25%

Hm, I cannot reproduce that with v12.0.1.4314 or v16.0.0.2178.

select ROUND(0.89, 2), ROUND(0.89, 1), ROUND(0.89, 0), ROUND(0.89, 0) * 1.0, CAST(ROUND(0.89, 0) AS VARCHAR)

returns as expected


FWIW, I have not found anything related to rounding errors in the current v16 EBF readme...

(01 Mar '16, 07:50) Volker Barth

There version and build of the server software (if different) is likely going be more important here than the version of dbisql. Of course if it is specific to the dbisql utility, getting a request log from your runs would might highlight the nature of the problem.

Maybe you can define the behaviour and usage better with a screen capture of the undefined scenario. ...or... You haven't provided the SQL that shows this either; so adding that to your posting might shed more light.

If you are showing constants where expressions actually exist the details about the epressions could be very important. {i.e. iff you have nullable expressions, and the option "conversion_error" set to 'Off', and the server is running a verions older the 2127, ... ,and this is not a new problem ... then you might be hitting a rarified bug #783410}

Otherwise I could not reproduce this either.

(01 Mar '16, 08:51) Nick Elson S...

The version is, in fact, the SQLAnywhere version, using the Ultralite engine, which excludes any server issues that may occurs, IMHO. I haven't tried a higher version yet. As soon as I do this, I'll update this post. Tks for all your replies.

(01 Mar '16, 09:00) Alex

Same error in SQLAnywhere 16.0.0 2193 using the query provided by @Volker in a fresh new Ultralite database.

(02 Mar '16, 06:34) Alex

I was able to reproduce this. We will investigate.

(03 Mar '16, 13:20) Chris Keating
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 01 Mar '16, 07:26

question was seen: 252 times

last updated: 03 Mar '16, 13:20