Hello,
I am working on a data rule logic in the Information Analyzer to pull the remainder from a decimal value.
I tried functions like Mod,FLOOR, Ceil but it's throwing errors saying they are not known scalar functions. I also tried using right function, this one worked but I can not bind the variable as it's converting the type to string based on the string function I used.
column_name_FLOOR(column_name)
right(column_name,2)
I went through the below forum chain and tried using Val() function but still I am having the binding issue.
http://dsxchange.com/viewtopic.php?t=156215
val(right(column_name,2))
can someone please help me fix this. TIA.
Data Quality - Issue with functions in the data rule logic
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 18
- Joined: Thu Dec 08, 2016 11:42 am
There is a version 11.5 technote about the val function that may be of interest. It says to apply rollup patch 5 for the fix.
If this describes your issue, then you may need to contact Support and request a patch for your version.
JR56745: val() returning incorrect results
http://www-01.ibm.com/support/docview.w ... wg1JR56745
If this describes your issue, then you may need to contact Support and request a patch for your version.
JR56745: val() returning incorrect results
http://www-01.ibm.com/support/docview.w ... wg1JR56745
Choose a job you love, and you will never have to work a day in your life. - Confucius
-
- Premium Member
- Posts: 425
- Joined: Sat Nov 19, 2005 9:26 am
- Location: New York City
- Contact:
What's a remainder? For a division's remainder use the module function (%) directly.
If you meant the fractional part of a decimal value that could be extracted using trunc() or round() functions as shown below
DecimalValue - trunc (DecimalValue, 0)
DecimalValue - round(DecimalValue, 0)
123.45 - trunc(123.45, 0)
123.45 - 123.00 = 0.45
****same result with Round()
Regards
If you meant the fractional part of a decimal value that could be extracted using trunc() or round() functions as shown below
DecimalValue - trunc (DecimalValue, 0)
DecimalValue - round(DecimalValue, 0)
123.45 - trunc(123.45, 0)
123.45 - 123.00 = 0.45
****same result with Round()
Regards
Julio Rodriguez
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses