Author |
Message
|
arunkumar1989 |
Posted: Mon Nov 24, 2014 11:02 pm Post subject: BLOB TO CHARACTER |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
Hi all,
I`m getting a blob value from Oracle table, I need to convert that into Character.
My Actual requirement is need to find length of the field values.
The field value is blob, as per my knowledge we cannot find length from blob,
so that i`m trying to convert that blob to character.
Thanks,
Arun _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
sebastia |
Posted: Mon Nov 24, 2014 11:15 pm Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
I think you can be yourself in a crowd and feel individual, but still dont have to be alone, and even enjoy the different opinions.
And "enlightenment" I think does not come from the feeling of "oneness", but from the desire to improve.
 |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Nov 24, 2014 11:20 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The LENGTH function does work on a BLOB Data type
However that is a red-herring
There are many examples in this forum of coverting a BLOB to a CHAR using CAST _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Nov 25, 2014 1:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You are correct - you cannot know how many characters are in the BLOB without performing a CAST to CHARACTER. Unless you are 100% certain that the target CCSID will be a single-byte encoding.
Quote: |
My Actual requirement is need to find length of the field values. |
Does a single BLOB contain two or more fields? If so, you should probably create a DFDL model to describe the structure. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
arunkumar1989 |
Posted: Tue Nov 25, 2014 3:36 am Post subject: |
|
|
 Voyager
Joined: 21 Nov 2012 Posts: 98 Location: Chennai
|
sebastia  _________________ Being in a crowd when you are alone is ignorance. Enlightenment is being alone in a crowd; a feeling of oneness in a crowd. |
|
Back to top |
|
 |
|