Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Logic Issue (IF)

Does anyone see anything wrong with this logic?  Thanks......

if(mid(MntPlan_WARPL,1,3) = 'PMA', mid(MntPlan_WARPL,1,3),
     
if(mid(MntPlan_WARPL,1,5) = 'PMA/D', mid(MntPlan_WARPL,1,5))) as PM_Type,

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

mid(MntPlan_WARPL,1,5) = 'PMA/D' would never be satisfied since mid(MntPlan_WARPL,1,3) = 'PMA' is satisfied first

View solution in original post

4 Replies
Clever_Anjos
Employee
Employee

mid(MntPlan_WARPL,1,5) = 'PMA/D' would never be satisfied since mid(MntPlan_WARPL,1,3) = 'PMA' is satisfied first

antoniotiman
Master III
Master III

This is correct sintax.

Ovewer if You have 'PMA/D' You also have 'PMA'

So, else condition never works.

I suggest to revers conditions.

Regards,

Antonio

tmumaw
Specialist II
Specialist II
Author

Thanks.....too early in the morning and only one cup of coffee......

Clever_Anjos
Employee
Employee

I´ve already have 3 cups