Select 0-.75 from system.iota – returns wrong results
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.”