Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to create a new field from 3 tables
my script is
Snif:load
Distinct OvedTokefDeptKey,
SnifDept as SacarDept
,OVEDSACAR as OVEDid
Resident SACAR;
left join LOAD Distinct [dip] as SacarDept,
[sub dip] as snif1
Resident Division; left join(Snif)
LOAD MIFAL as snif2
,OVEDOVED AS OVEDid
Resident Oved;
LOAD OvedTokefDeptKey,
OVEDid,IF(snif1<>0,snif1,snif2) AS SNIF
Resident Snif;
DROP Table Snif;
is there any oter way?
thanks,
Ester
The Below code should work.
Snif:
Load *,
IF(snif1<>0,snif1,snif2) AS SNIF
;
load Distinct
OvedTokefDeptKey,
SnifDept as SacarDept
,OVEDSACAR as OVEDid
Resident SACAR;
left join LOAD Distinct [dip] as SacarDept,
[sub dip] as snif1
Resident Division; left join(Snif)
LOAD MIFAL as snif2
,OVEDOVED AS OVEDid
Resident Oved;