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

Alex
1.1k274756
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

ROUND(.89,2),ROUND(.89,1),ROUND(.89,0),ROUND(.89,0)*1.0,ROUND(.89,0)
0.89,0.90,1.00,1.00,'1.00'


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
2

I was able to reproduce this. We will investigate.

(03 Mar '16, 13:20) Chris Keating
Replies hidden

Any news about this issue?

(13 Mar '17, 14:29) Alex
showing 5 of 6 show all flat view
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×160
×68
×43

question asked: 01 Mar '16, 07:26

question was seen: 1,620 times

last updated: 13 Mar '17, 14:29