Author |
Message
|
rharikumar |
Posted: Fri Feb 21, 2014 6:25 am Post subject: Appending Values to a character value |
|
|
Novice
Joined: 14 Oct 2013 Posts: 16
|
Hello All
This is my requirement .
1. I need to produce a 26 character length xml tag .
2. In cases where i get less than 26 , i have to add 'A' equivalent to compensate the missing length .
Example :
Length expected : 12345678
Length received : 123456
Expected code outcome - 123456AA
Any suggestions on how to go about this ? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 21, 2014 6:32 am Post subject: Re: Appending Values to a character value |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rharikumar wrote: |
Any suggestions on how to go about this ? |
Write some ESQL? Probably using the LENGTH, SPACE & REPLACE functions? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Feb 21, 2014 6:53 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Any suggestions on how to go about this ? |
Talk to the person who specified the XML format and ask them to explain the requirement? _________________ 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 |
|
 |
Vitor |
Posted: Fri Feb 21, 2014 7:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kimbert wrote: |
Quote: |
Any suggestions on how to go about this ? |
Talk to the person who specified the XML format and ask them to explain the requirement? |
I had taken the use of "tag" to mean "a tag which has a value constraint requireing 26 characters" rather than the name.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Gralgrathor |
Posted: Fri Feb 21, 2014 7:16 am Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
Vitor wrote: |
I had taken the use of "tag" to mean "a tag which has a value constraint requireing 26 characters" rather than the name.  |
Hell no. If you can find a way to prevent people from using well-defined message structures, use it. Never allow a message set to stand between you and some poorly documented ESQL code, I says! |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Feb 21, 2014 9:40 am Post subject: Re: Appending Values to a character value |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
rharikumar wrote: |
Any suggestions on how to go about this ? |
Write some ESQL? Probably using the LENGTH, SPACE & REPLACE functions? |
Where's the love for the perfectly useful OVERLAY function? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 21, 2014 10:19 am Post subject: Re: Appending Values to a character value |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Vitor wrote: |
rharikumar wrote: |
Any suggestions on how to go about this ? |
Write some ESQL? Probably using the LENGTH, SPACE & REPLACE functions? |
Where's the love for the perfectly useful OVERLAY function? |
We've had a falling out; found out OVERLAY had been seeing TRIM behind my back.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|