Author |
Message
|
SANTYP |
Posted: Tue Dec 09, 2008 12:39 am Post subject: How to get a character's ascii value in MB |
|
|
 Centurion
Joined: 27 Mar 2007 Posts: 142
|
HI all,
I have a value : 'PIT000' I need to increment this value i.e. PIT001, PIT002, etc until PIT999, the next step is: once you reach PIT999, the value needs to change to PIU000!!"
Plaese respond ASAP ,
Thanks in Advance.. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 09, 2008 1:16 am Post subject: Re: How to get a character's ascii value in MB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
SANTYP wrote: |
I have a value : 'PIT000' I need to increment this value i.e. PIT001, PIT002, etc until PIT999, the next step is: once you reach PIT999, the value needs to change to PIU000!!" |
I suspect you'll need to write some custom code for that. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
SANTYP |
Posted: Tue Dec 09, 2008 3:46 am Post subject: Re: How to get a character's ascii value in MB |
|
|
 Centurion
Joined: 27 Mar 2007 Posts: 142
|
Vitor wrote: |
SANTYP wrote: |
I have a value : 'PIT000' I need to increment this value i.e. PIT001, PIT002, etc until PIT999, the next step is: once you reach PIT999, the value needs to change to PIU000!!" |
I suspect you'll need to write some custom code for that. |
Could you suggest me how can I go for that..? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 09, 2008 4:03 am Post subject: Re: How to get a character's ascii value in MB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
SANTYP wrote: |
Could you suggest me how can I go for that..? |
Produce a custom function in the language of your choice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 09, 2008 4:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Cast it to an unsigned integer and add 1? Determine the allowed range bytetwise as to when to go to the next byte? Determine the low value for each of the bytes.... Well it gets more and more complicated... You might as well attack the problem as a byte array and fix it byte by byte + overflow...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ggriffith |
Posted: Tue Dec 09, 2008 4:13 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
I'd split the field up and use some basic ESQL functions |
|
Back to top |
|
 |
|