Discussion Board for collaboration on QlikView Scripting.
I am having data like,
but,when i am joining these two table it gives me output like,
and I want output like
how I will achieve this output
After that tou joined the tab for example in this way:
load * resident tab1;
load * resident tab2;
Read it again in this way and add a control
load ID, if(isnull(cat), cat1, cat) as cat,
load ID, if(isnull(cat1), cat, cat1) as cat1
drop table Tab;
If I follow you correctly, then you want to keep the value of cat1 where it exists, but if there is no value, you want the value of cat. This can be done as followed:
If you load the full table after the join and add the following line:
IF (cat1 = '-',cat,cat1) as catnew;
and then after checking, in a new load or a preceding load you drop the old cat1 and rename catnew into cat1, you'd get what you need.
if(isnull(cat),cat1,cat) as cat,
DROP TABLE table1;
Read this document published here by HIC, is very interesting.