Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
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