Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a column 'Status' with values from 1 till 10.
I have to implement a condition for this column like below:-
if(status=('1,2,3,5,6,7'),'Open',
if(status=('4,8,10'),'Closed',
if(status=('9'),'Rejected')) as Status_definition, I tried using this but not getting desired output.
Please suggest
I would rather use Match() function like. Since you have number's you no need to consider as string. If you have text in status, you hav do draft 'Yes','No' etc.
if(Match(status, 1,2,3,5,6,7),'Open', if(Match(status, 4,8,10),'Closed', if(Match(status, 9),'Rejected'))) as Status_definition
use
if(match(status,'1','2','3','5','6','7'),'Open',
if(match(status,'4','8','10'),'Closed',
if(status='9','Rejected')) as Status_definition
instead
Thanks Anil
Please accept correct answer to track this ticket and it will help for community managers to sort out on their DB.