Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts!
As per two tables joined which carries almost similar data except for few not agreed policy numbers,what I need is to show only disagreed numbers with their respective values in 2007. Also what is agreed need to be shown as agreed records with their respective values. I prefer this to be split in the script so that a list box could be created for agreed vs Not agreed
Thanks in advance
You are using P16 and P17
Where as in last table it is p16 and p17. Field names were not matching, case sensitive.
Try
2016:
LOAD POLICY_NUMBER AS P16, REF, RS
FROM
Left Join
2017:
LOAD POLICY_NUMBER AS P17, REF, RS, D, E
FROM
FinalLoad:
LOAD *,
if(P16 <> P17, 'Disagreed', 'Agreed') as Flag
Resident 2016;
drop Table 2016;
try this script:
T:
LOAD POLICY_NUMBER,
REF,
RS
FROM
2017.xlsx
(ooxml, embedded labels, table is [2017]);
left join
LOAD Distinct POLICY_NUMBER,
'Agreed' as TYPE
FROM
2016.xlsx
(ooxml, embedded labels, table is [2016]);
Final_table:
NoConcatenate
load POLICY_NUMBER,
REF,
RS,
if(isnull(TYPE),'Disagreed',TYPE) as TYPE
Resident T;
Drop Table T;
according to the task it's better to use 2017 left join 2016, I think
Dear S Khan,
Thanks for your reply which woks well.
Regards!
Dear Tastiana,
Your reply too ok.
Thank you very much for your quick response as well.
Best Regards
Neville
check script once again attentively please, it should be 2017 left join 2016
"if a policy number which is in 2016 is appeared in 2017 table as well, that record is agreed. If any record which is there in 2017 table but not in 2016 table that record to be treated as disagreed."
Yes Dear Tastiana,
Your guidance helped me to adjust it little bit to suit my requirement!
Thank you very much. Hoping your same feed back in my future issues.
Regds
Neville