on 02-28-2008 10:00 PM
Hi All
I have two source fields,first one is from 0-11 char and second one is from 12-22 char,I need to concatenate both and send to target.But the source 1st field can have any number of char upto 11 char.
For eg I pass 17 in the first field and 100 in the 2nd field I need to get 17( 9 spaces)100 in my target field.
For eg I pass 2 in the first field and 6 in the 2nd field I need to get 2( 9 spaces)6 in my target field.
How can I achive this
thanks
points will be awarded
Edited by: guest xi on Feb 28, 2008 11:01 PM
Hi,
Write simple UDF with two input parameters a,b.
StringBuffer sb = new StringBuffer("");
for(int i=a.length();i<12;i++)
{
sb.append(" ");
}
return a+""+sb.toString()+""+b;
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the mapping convert the numbers to strings and then concatenate. I guess you will achieve your target
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.