Question

W&W
DE
Last activity: 7 Jun 2019 9:55 EDT
Different data in column and BLOB (missing decimal places)
Hi community,
while fixing an issue in one of our Pega applications we made the following observation:
- We received a numerical value (e.g. ‘123.56’) in a string from a service
- In a data transform this value was passed directly (no casting) into a double property (this is already fixed and now we do a proper casting with ‘@pyStringToDouble’).
- After saving the quote object on our DB table DATA.SFAI_WORK_QUOTE we realized that the values that were stored in the exposed column (ANNUALPREMIUM) and the BLOB were different:
As you can see, the decimal places were not stored in the exposed column but in the BLOB.
Hi community,
while fixing an issue in one of our Pega applications we made the following observation:
- We received a numerical value (e.g. ‘123.56’) in a string from a service
- In a data transform this value was passed directly (no casting) into a double property (this is already fixed and now we do a proper casting with ‘@pyStringToDouble’).
- After saving the quote object on our DB table DATA.SFAI_WORK_QUOTE we realized that the values that were stored in the exposed column (ANNUALPREMIUM) and the BLOB were different:
As you can see, the decimal places were not stored in the exposed column but in the BLOB.
- We fixed this behavior following the solution described in this community thread https://collaborate.pega.com/question/one-decimal-column-pega-table-defined-wrongly (we altered the column to Decimal(20,2) )
- Everything works fine now and the same values are saved in column and BLOB.
The problem does not occur anymore and everybody is happy. ;-)
BUT ... there is still an open question. Can anyone explain why the data was stored differently in the column and the BLOB before the fix? Ok, we handled the data the wrong way and the column was not properly set up, but usually I expect that the values in column and BLOB should be the same. So why were the decimal places saved in the BLOB?
Regards
Olaf
***Edited by Moderator Marissa to update platform capability tags****