on 10-24-2007 3:09 PM
Hi Experts,
1)i need to check any comma in the FirstName field and replace to space and map to target field.
2)i need to check the field is numeric or alpha numeric based on that i need to map proper field in target.
Can anyone please help me how can we do it?
Kind Regards,
kiran.
<i>1)i need to check any comma in the FirstName field and replace to space and map to target field.</i>
Write a UDF for it. Use replace function in it.
<i>2)i need to check the field is numeric or alpha numeric based on that i need to map proper field in target.</i>
U may write a UDF for it. And according to the output, map further.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The other people have already answered well to your questions.
To learn more about mapping I suggest you to see the following links:
/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Salvatore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the below code for checking for Interger or AlphaNumeric in UDF
try
{
int i=Integer.parseInt(input,10);
return Integer.toString(1);
}catch (NumberFormatException exception)
{
return Integer.toString(2);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As Prateek mentioned UDF will help to resolve it.
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
<b>1)i need to check any comma in the FirstName field and replace to space and map to target field.</b>
For this use replaceString standarad function give the first input as u r source field,for 2nd input take constant and give the value ,(Comma) and for 3rd input take a constant and give the value Space and map to u r target filed.It will replace all commas in source value by a Space.
For second one need to write a UDF.
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.