I have a string datatype column which contains values such as '1841000'. The value should be '18410'. I have tried the following:
Replace(RTrim(R eplace(MyValue, "0", " ")), " ", "0")
The problem is that this is replacing all trailing 0's and I wind up with '1841'.
Can you tell me what I can use to only truncate or remove the last 2 0's in my value? Also, the length of the column varies. I have been trying various functions all morning and have not been able to do this successfully.
Thanks for any help I can get!!
Replace(RTrim(R eplace(MyValue, "0", " ")), " ", "0")
The problem is that this is replacing all trailing 0's and I wind up with '1841'.
Can you tell me what I can use to only truncate or remove the last 2 0's in my value? Also, the length of the column varies. I have been trying various functions all morning and have not been able to do this successfully.
Thanks for any help I can get!!
Comment