eText Template - SUBSTR not working
Hi,
I am struggling with below SUBSTR function not working to display the right 10 numbers. If I run the below function in SQL Plus, I get the correct right 10 numbers.
SUBSTR(TRIM(TO_CHAR(SUM(TO_NUMBER(SUBSTR(OutboundPayment/PayeeBankAccount/BankAccountNumber,1,15))))),-10)
I also tried the below way but no luck
SUBSTR(TRIM(TO_CHAR(SUM(TO_NUMBER(SUBSTR(OutboundPayment/PayeeBankAccount/BankAccountNumber,1,15))))),-10,10)
However if I do something like get only the first 5 numbers like below, it works.
SUBSTR(TRIM(TO_CHAR(SUM(TO_NUMBER(SUBSTR(OutboundPayment/PayeeBankAccount/BankAccountNumber,1,15))))),1,5)
Appreciate your help.
Thanks.