Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

any easier way to replace the last character of a string?

672680Dec 20 2010 — edited Dec 20 2010
this is what I got:
select SUBSTR('tjgb005dy_01_31_08',1,LENGTH('tjgb005dy_01_31_08')-1)||'1' from dual;

--
tjgb005dy_01_31_01
and I am not quite fond of it. it looks ugly and it is long.
so, I wonder if you guys have better ideas?

Thanks
This post has been answered by hm on Dec 20 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 17 2011
Added on Dec 20 2010
8 comments
927 views