cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

<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

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

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);

}

agasthuri_doss
Active Contributor
0 Kudos

Hi,

As Prateek mentioned UDF will help to resolve it.

Regards

Agasthuri Doss

Former Member
0 Kudos

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