Link to home
Start Free TrialLog in
Avatar of yan_er04
yan_er04

asked on

trim() ???

My data is store as a blob type. When i retrieve it, it becomes a object. I tried to typecast it to a string but i get errors. WHy? Is there another way for me to trim the spaces away?
Avatar of cheekycj
cheekycj
Flag of United States of America image

Isn't BLOB, Binary Large Object? so you wouln't be able to cast that to a string.


You can try retrieving it as a byte[] and then creating a string from that byte[].

have you tried trim in the query itself?
SELECT TRIM(BOTH ' ' FROM value) FROM test;
Did the above work?
ASKER CERTIFIED SOLUTION
Avatar of ibo
ibo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

"Accept ibo's comment as answer."
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kuldeepchaturvedi
EE Cleanup Volunteer