Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Why am I encountering a "%KYCIDLookUp2 field not found" error in these lines of script?
LookUp:
LOAD ID as %KYCIDLookUp2,
FROM abc;
Temp:
LOAD ID as %KeyID,
If(not Exists(KYC_ID,%KYCIDLookUp2) and IsNull(DATE_OF_BIRTH),Dual('Not captured',1),
If(Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) < 20,Dual('Below 20',2),
If(Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) >= 20 and Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) < 30,Dual('20-29',3),
If(Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) >= 30 and Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) < 40,Dual('30-39',4),
If(Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) >= 40 and Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) < 50,Dual('40-49',5),
If(Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) >= 50 and Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) <= 54,Dual('50-54',6),
If(Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) >= 55 and Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) <= 59,Dual('55-59',7),
If(Age(Today(),DATE(FLOOR(DATE_OF_BIRTH),'DD/MM/YYYY')) >= 60,Dual('60 and Above',8),)))))))) as [Age Bucket]
FROM xyz;
In that case is because that field does not exist in the current table, the table where the Exists expression is.
You might want to reverse the order of parameters in your Exists clause. The first one is the one that looks for previously loaded values.
In that case is because that field does not exist in the current table, the table where the Exists expression is.
You might want to reverse the order of parameters in your Exists clause. The first one is the one that looks for previously loaded values.