• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 787
  • Last Modified:

trim in Oracle is not working

Hey,

I tried to trim the value from one field from table A;

select fieldA, dump(fieldA) from table A;

V004888,Typ=1 Len=11: 32,32,32,86,48,48,52,56,56,56,32

How can i retrieve fieldA without special character?

Thanks
0
idmdeveloper
Asked:
idmdeveloper
  • 2
1 Solution
 
sdstuberCommented:
if fieldA is of type CHAR,  it will always be right-padded with spaces.


however,  this should yield what you are looking for

select trim(fielda) from tableA;
0
 
sdstuberCommented:
yes, I just tried it....

---- without trim

SELECT fielda, DUMP(fielda) FROM tablea;

FIELDA     DUMP(FIELDA)                               
---------- -------------------------------------------
   V04888  Typ=1 Len=10: 32,32,32,86,48,52,56,56,56,32
1 row selected.

Open in new window


with trim

SELECT trim(fielda), DUMP(trim(fielda))  FROM tablea;

TRIM(FIELDA) DUMP(TRIM(FIELDA))            
------------ ------------------------------
V04888       Typ=1 Len=6: 86,48,52,56,56,56
1 row selected.

Open in new window


if these aren't your results, please post sample data and expected output.
0
 
jrb1Commented:
Anything else on this issue?
0
 
idmdeveloperAuthor Commented:
Thanks a lot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now