Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
I need to set an if condition in the script :
NoConcatenate
CASES:
LOAD *,
if( Match(PROVIDER_GRP_ID, 'RECL_HV','RECL_MV', 'RECL_LV', 'UDRÉSIDEN', 'URVASRÉSID', 'ESHOP', 'SELF_CARE','RÉCSOCIALM','URCORP','URMOB2C','URVASB2B','MAILING','RECLFACT'),'Mobile','Fixe')
as [Type Acces]
Resident F_TMP_CASES
this script works fine if the result is two option mobile or fixe but i need to add a third option if match (PROVIDER_GRP_ID 'test' then test
how to add it ??
Hello Wiem,
Why don't you try this.
CASES:
LOAD *,
if(PROVIDER_GRP_ID= 'Test','Test', if( Match(PROVIDER_GRP_ID, 'RECL_HV','RECL_MV', 'RECL_LV', 'UDRÉSIDEN', 'URVASRÉSID', 'ESHOP', 'SELF_CARE','RÉCSOCIALM','URCORP','URMOB2C','URVASB2B','MAILING','RECLFACT'),'Mobile','Fixe') )
as [Type Acces]
Resident F_TMP_CASES;
Regards,
S
I like to use a mapping load and applymap for this, easier to maintain and more comprehensive than a lot of if's
Something like
Provider:
Mapping Load * Inline [From, To
'RECL_HV','Mobile'
'RECL_MV','Mobile'
'RECL_LV','Mobile'
'UDRÉSIDEN','Mobile'
'URVASRÉSID','Mobile'
'ESHOP','Mobile'
'SELF_CARE','Mobile'
'RÉCSOCIALM','Mobile'
'URCORP','Mobile'
'URMOB2C','Mobile'
'URVASB2B','Mobile'
'MAILING','Mobile'
'RECLFACT','Mobile'
'Test','Test'
];
Load *,ApplyMap('Provider',Data,'Fixed') as [Type Acces];
Load * Inline [Data
'RECL_HV'
'RECL_MV'
'RECL_LV'
'UDRÉSIDEN'
'URVASRÉSID'
'ESHOP'
'SELF_CARE'
'RÉCSOCIALM'
'URCORP'
'URMOB2C'
'URVASB2B'
'MAILING'
'RECLFACT'
'Test'
'NotMobIleOrTest'
];