tiver43809
IS-IT--Management
I am trying to come up with a query that will delete the right most digit from a talble sdn and field trans.
For example
My trans = 1847706* I would like to delete the * so my result would be 1847706.
The amount of digits fluctuates so some translated digits may consist of 7 digits other may only be 3. So i do not think I can us Substring?
I've figured out how to select the right most digits.
select right(Trans,1) from sdn
And edit what I want to select.
Select right(Trans,1) from sdn where transl like '%*'
But I can not figure out how to delete just the right most digits. Everything I try and delete either deletes everything but the right or everything but the left.
For example
My trans = 1847706* I would like to delete the * so my result would be 1847706.
The amount of digits fluctuates so some translated digits may consist of 7 digits other may only be 3. So i do not think I can us Substring?
I've figured out how to select the right most digits.
select right(Trans,1) from sdn
And edit what I want to select.
Select right(Trans,1) from sdn where transl like '%*'
But I can not figure out how to delete just the right most digits. Everything I try and delete either deletes everything but the right or everything but the left.