cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Lookup's in One Decode

0 Kudos

Hi Experts,

I got a requirement to write two lookup's in one Decode statement. Can you please confirm is it possible in CPI-DS? When i am writing the 2 lookup's in one decode it is saying, 2nd lookup is not lookup table doesn't exists in the datastore but it exists.

Decode ((TYPE = 'X'), (lookup()),

(TYPE = 'Y'), (lookup()),

'123')

Can you please share an examples for the above.

Thanks & Regards,

Nagaraju.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member678011
Participant
0 Kudos

Hi Nagaraj,

I tried the same and when I use different lookup tables I was getting the same issue as above but when I use the same lookup table there was no issue and I assume this is a limitation.

with different tables :

With same tables :

we can use below method to achieve the above logic(for different lookup tables) :

1'st transform - Decode(TYPE = X, lookup(), TYPE)

2'nd transform - Decode (TYPE = Y, lookup(), '123').

Regards,

Sibi Sivakumar