Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping

Hello All,

I need to map all those starting by Status_description AP001 to the status code AP001.

Example:

Status_Description          Status_Code

AP001 THUR                    AP001

AP001 ERTD                    AP001

AP001 PLYT                     AP001

So I created a Mapping as below:

Map:

     Mapping load * inline [

     Status_Description,Status_Code

     AP001* , AP001

But it does not work.

Any idea?

KR,

Hasvine

6 Replies
Mark_Little
Luminary
Luminary

Hi,

I think it will be down to the '*', not sure it is works with the wildcard in a mapping.

What is it your trying to do?

Have you thought about mapping usign the subfield() function.

SUBFIELD(Status_description,' ',1) as Status_Code

Mark

tresesco
MVP
MVP

Mapping doesn't work with wildcards. Try with WildMatch(), like:

Load

          if(WildMatch(Field, 'AP0001*') , 'AP0001' , Field) as NewField

tresesco
MVP
MVP

Or, even try with MapSubstring(). You may refer: Re: Wildcard when ApplyMap

Anonymous
Not applicable
Author

Like useful compare the fields

Anonymous
Not applicable
Author

Try somthing like?

Where/IF  Status_Description like 'AP001*'    

sathishkumar_go
Partner - Specialist
Partner - Specialist

Try this,

if(left(Status_Description,5) = 'AP001','AP001') AS status_code

-Sathish