Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have an table like below
groupid | region |
aaa | usa;uae;canada |
bbbb | india;japan;china |
ccc | india;europe;aus |
ddd | chile;china;buton |
eee | germany;austria;texas |
output like below
groupid | region | Condition |
aaa | usa;uae;canada | yes |
bbbb | india;japan;china | No |
ccc | india;europe;aus | yes |
ddd | chile;china;buton | no |
eee | germany;austria;texas;korea | yes |
How to write condition or match fucntion here ,
if Uae and canada present for groupid(aaa) given as condition yes
if india and aus present for groupid(ccc) given as condition yes
if austria and korea present for groupid(eee) given as condition yes
for remaining all groups condition No
Dear Pala,
TEST:
Load * inline [
groupid, region
aaa, usa;uae;canada
bbbb, india;japan;china
ccc, india;europe;aus
ddd, chile;china;buton
eee, germany;austria;texas];
TEST2:
Load
groupid,
region,
If(groupid='aaa' and WildMatch(region,'*uae*','*canada*'),'yes'
,If(groupid='ccc' and WildMatch(region,'*india*','*aus*'),'yes'
,If(groupid='eee' and WildMatch(region,'*austria*','*korea*'),'yes','No'))) as Condition
Resident TEST
;
drop table TEST
Dear Pala,
TEST:
Load * inline [
groupid, region
aaa, usa;uae;canada
bbbb, india;japan;china
ccc, india;europe;aus
ddd, chile;china;buton
eee, germany;austria;texas];
TEST2:
Load
groupid,
region,
If(groupid='aaa' and WildMatch(region,'*uae*','*canada*'),'yes'
,If(groupid='ccc' and WildMatch(region,'*india*','*aus*'),'yes'
,If(groupid='eee' and WildMatch(region,'*austria*','*korea*'),'yes','No'))) as Condition
Resident TEST
;
drop table TEST
Thnak you so much