Author |
Message
|
SDS |
Posted: Mon Oct 17, 2011 9:11 pm Post subject: Working with BLOB |
|
|
 Apprentice
Joined: 13 Jun 2011 Posts: 47
|
Hi
I need to filter out the highlighted part [00003a] from the entire BLOB string.
BLOB:
22003a00523a12533a11070209023a003a00113a00000006023a748998563a
15673af03a000000293a000000433a000000003a000029313a643a003a00003a222c22993a103a283a31222c
Can anyone tell me how to proceed & filter out this part from the string?
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 18, 2011 1:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
in what part does the blue highlighted part not match the red one?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ruchir |
Posted: Tue Oct 18, 2011 1:58 am Post subject: |
|
|
Guest
|
Hi,
You can cast your blob to string and then substring it according to your need.
Hope it helps you.  |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 18, 2011 2:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
ruchir wrote: |
Hi,
You can cast your blob to string and then substring it according to your need.
Hope it helps you.  |
Why do you believe that substring does not work on blobs? |
|
Back to top |
|
 |
ruchir |
Posted: Tue Oct 18, 2011 2:29 am Post subject: |
|
|
Guest
|
Actually i havn't tried it ..
But i hope we can use that way also.
Thanks for the point. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Oct 18, 2011 3:00 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
ruchir wrote: |
Actually i havn't tried it ..
But i hope we can use that way also.
Thanks for the point. |
Dare I say it, RTFM  _________________ 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 |
|
 |
SDS |
Posted: Tue Oct 18, 2011 9:09 pm Post subject: |
|
|
 Apprentice
Joined: 13 Jun 2011 Posts: 47
|
hey..
thanks for all the replies..
Actually the issue is that I have to filter out the red highlighted part which starts after the 2nd '3a' and ends before the 3rd '3a' and the biggest problem is that the length of that part is variable.
3a44423a313233342a2a2a2a2a2a2a2a363738393a3130303031333638373432323a3a3a31222c
Can anyone help me to fix this issue?? |
|
Back to top |
|
 |
ruchir |
Posted: Tue Oct 18, 2011 9:25 pm Post subject: |
|
|
Guest
|
SDS wrote: |
the biggest problem is that the length of that part is variable. |
How that will change the way you r substringing the BLOB. I think in that case also you can easily substring the BOLB. |
|
Back to top |
|
 |
SDS |
Posted: Tue Oct 18, 2011 9:31 pm Post subject: |
|
|
 Apprentice
Joined: 13 Jun 2011 Posts: 47
|
Thanks Ruchir.
But how can we SUBSTRING a portion if the length is variable??
and also the SUBSTRING position may get changed like below.
3a4442198742343a313233342a2a2a2a2a2a2a2a363738393a3130303031333638373432323a3a3a31222c |
|
Back to top |
|
 |
SDS |
Posted: Tue Oct 18, 2011 10:18 pm Post subject: |
|
|
 Apprentice
Joined: 13 Jun 2011 Posts: 47
|
Hey Ruchir.
Thanks a lot.
Finally SUBSTRING works!!!  |
|
Back to top |
|
 |
|