Select 0-.75 from system.iota – returns wrong results

SQL statment “Select 0-.75 from system.iota”

In previous versions it correctly returned -0.75.

In version 12 it returns 9.75

SQL statment "Select 0-.75 from system.iota" In previous versions it correctly returned -0.75. In version 12 it returns 9.75

Select 0-.75 from system.iota - returns wrong results

Very Helpfull

User Rating: Be the first one !
Add Comment
1 Answer(s)

    We came across this by customers complaining that wrong info is showing for customer’s balances.

    The balances at that table were being pushed thru an After Update Trigger on a different database, where to avoid null values the current value is concatenated into a SQL statement by doing something like:

    Execute Immediate ‘Update TargetTable Set TargetField=0’+Cast(__New.Balance AS SQL_VARCHAR)+’ Where CustID=”’+Cast(__New.CustID AS SQL_VARCHAR)+”’;’;

    It turned out that whenever customer balance was below zero the wrong information is posted.

    It would’ve been a “NICE BUG” if this would be just an academic testing field. Problem is that SAP is dealing it in this manner.

    Opened a support ticket, only to have to proof it’s a bug and be told in the end “This incident is being forwarded along for development to look into next.”

    Add Comment

    Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.