Hi All,
Problem Statement:
I have a field with BLOB data type in DB2 database, I want to extract this blob and convert it to Text. The text data after the conversion will be in Japanese characters. How can I write a select with the conversion from Blob to Text and have the proper conversion from BLOB to Japanese Text.
Any quick help is highly appreciated.
Regards,
Jitesh

Views: 60

Reply to This

Replies to This Discussion

Hi All,
I have been working on this requirement and could manage to convert blob to hexadecimal and when I convert the hexadecimal value to text on online converters (from hexadecimal to string) its giving me the desired results.
Now, could anyone please help in converting hexadecimal to string/ text at the query level or through any script?

Thanks in advance.
Regards,
Jitesh
I finally managed to convert the blob into text (Japanese Characters). Below are step I could figure out:
1. Convert to BLOB to Hexadecimal. Simple conversion can be done at SQL query level.
2. Once you have the hexadecimal values, you can write a xxd command on unix to convert it to text.

Regards,
Jitesh

RSS

Bringing Db2 enthusiasts together virtually. Expert or novice, distributed or mainframe, this is the place for everything DB2.

Forum

5 Ways to Manage Stressful Situations

Started by ashley gill in What's hot ? May 10. 0 Replies

Stress is a common feeling that every human being experiences. As we all know from experience, stress can impact our life negatively and it should, therefore, be dealt with properly. Stress may be unavoidable but how it is handled is our choice.…Continue

Tags: training, corporate

Conversion of BLOB to String/ Text

Started by Jitesh Audichya in Application Development and DB2. Last reply by Jitesh Audichya Apr 24. 2 Replies

Hi All,Problem Statement:I have a field with BLOB data type in DB2 database, I want to extract this blob and convert it to Text. The text data after the conversion will be in Japanese characters. How can I write a select with the conversion from…Continue

Tags: on, DB2, conversion, text, to

© 2020   Created by Surekha Parekh.   Powered by

Badges  |  Report an Issue  |  Terms of Service