cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue

former_member229127
Participant
0 Kudos

Hi Experts ,

Am facing with an issue

for an logic


if RED_CIR_CAR_ENDAT  (RED_CIR_CAR_ENDAT ) = DECODE(TRUE, NOT ISNULL(v_RED_CIR_CAR_ENDAT) AND SUBSTR(v_RED_CIR_CAR_ENDAT,1,5) != '00000' AND SUBSTR(v_RED_CIR_CAR_ENDAT,1,4) != '9999',

Then it should pass or else it should be empty ..

SUBSTR(v_RED_CIR_CAR_ENDAT,1,4) || '-' || SUBSTR(v_RED_CIR_CAR_ENDAT,5,2) || '-' || SUBSTR(v_RED_CIR_CAR_ENDAT,7,2))

For this i have created like this

Please help me out ...

Best regards,

Sandhya

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Hello Sandhya,

Try this :

Execution Type - Single Values

Argument :

          Name - datainput

          Type  - String


if (!(datainput .equals(""))  && !(datainput.substring(0,4).equals("9999")) && !(datainput.substring(0,5).equals("00000") ))

{

return  datainput.substring(0,4)+"_"+ datainput.substring(4,6)+"_"+ datainput.substring(6,8);

}

else

{

  return "";

}

Don't change the context of RED_CIR_CAR_ENDAT from the source. If your requirement is different then let us know!

Thank you,

Justin.

Sorry, I had to change the conditions to match the string values.. Please check now..

former_member229127
Participant
0 Kudos

Thanks for reply !

Let me check and get back to you .

Answers (2)

Answers (2)

justin_santhanam
Active Contributor
0 Kudos

Sandhya,

Can you give me the sample value of  RED_CIR_CAR_ENDAT?

Thank you,

Justin.

former_member186851
Active Contributor
0 Kudos

Sandhya,

Your facing any issue with this logic?

former_member229127
Participant
0 Kudos

Hi Raghu,

Yes am facing issue logic is not working so .

Regards,

Sandhya

former_member186851
Active Contributor
0 Kudos

Can you please elaborate more on the logic.its a bit confusing.

former_member229127
Participant
0 Kudos

Requirement is simple

when RED_CIR_CAR_ENDAT field  is -> not null , (substring 1,5) != 00000 , (substring1,4) != 9999


then it should pass the output value as (substring 1,4) || '_'|| (substring 5,2) ||'_'||(substring7,2) or else it should pass empty .








former_member186851
Active Contributor
0 Kudos

Try this logic

former_member229127
Participant
0 Kudos

Thanks for the reply but, it is throwing the same error as before

Any UDF ?? or any thing suits for my mapping

Help me out

Regards,

former_member186851
Active Contributor
0 Kudos

What is the error displayed?

justin_santhanam
Active Contributor
0 Kudos

Raghu,

Take a look at the mapping provided by Sandhya.. There are couple of issues I can see :

  - Substring has to start from 0

-  notEquals is not String function, it's boolean function

Thank you,

Justin,.