on 01-29-2007 11:58 AM
Hi all,
I have one filed(0...unbounded) in source side of maximum length called data.
EX:abc1234567890988...........
def3456789444499
I have to check the condition that If substring of data(ie 0 to 3 is <b>"abc"</b>) then I want the output of position 4 to position 10 of <b>"def"</b> record.
Please help me out........
Hi Nandini
Do close the thread if the post is been answered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So your xml is:
<data>abc123...</data>
<data>def123...</data>
<data>abc123...</data>
<data>def123...</data>
or is it more like:
<data>any123...</data>
<data>abc123...</data>
<data>any123...</data>
<data>def123...</data>
You should try to describe the problem as detailed as possible to get help.
Stefan
considering the source message:
<b><data>abc123...</data>
<data>def123...</data>
<data>abc123...</data>
<data>def123...</data></b>
check if this works:
String[] ret = new String[strA.length/2];
i=0;int j=0;
while(i<strA.length && strA<i>!=null)
{
if(strA[i++].substring(0,3).equals("abc"))
{
ret[j++] = strA<i>.substring(3, 10);
}
i++;
}
return ret;
If you r specific of UDF then the below code shud help you
<b><i>if (s1.substring(0,2).equals("abc"))
{
return s2.substring(3,10);
}</i></b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Use graphical mapping
field -- substring -equals = (abc) -if statement then substring(4,10) to be root.
Regards
Chilla..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nandini,
assumedly u dont need a UDF. U can achieve that with function "substring".
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nandini,
You can use the standard functions-> startsWith,substring in your message mapping.
Regards,
Deviprasad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.