I have an amount column which is in money format. I have tried using parsename, converting it to varchar to use substring function but unable to extract exact values appearing after decimal. Attaching the screenshot for reference.
select home_currency_amount,
cast(home_currency_amount as varchar(50)) as amt_varchar,
parsename(home_currency_amount, 1) as amt_prsnm
from #temptbl;
---Below is the output:
home_currency_amount amt_varchar amt_prsnm
39396.855 39396.86 86
1112.465 1112.47 47
5635.1824 5635.18 18
E.g. if value is 39396.855, desired output would be 855.
Thanks in advance for the help.