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!

Trim Does not seem to be working porperly

Rajan SwAug 7 2014 — edited Aug 7 2014

Hi Guys,

I am executing this query

SELECT TRIM('QUY BAO LANH       ') ,LENGTH('QUY BAO LANH       ') ,LENGTH(TRIM('QUY BAO LANH       ')) FROM DUAL; 

and getting this result set

QUY BAO LANH      1919

The length is 19 even before and after trimming.Please provide me your inputs why the trim is not trimming the spaces.Is it not space rather a junk character if so then How can I ensure this.

I am using this version

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

PL/SQL Release 11.2.0.3.0 - Production

"CORE 11.2.0.3.0 Production"

TNS for Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

Regards,

Papi

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2014
Added on Aug 7 2014
11 comments
4,435 views