Discussion board where members can get started with QlikView.
how can I join the tables to get result like below:
The result table should have the old_CustomerId when no new_CustomerId exists.
When I do a 'left join' my result table look like this:
How can I push the the old_CustomerId into my result table when no new_CustomerId exists???
I would map the customer ID:
applymap('MAP', old_CustomerID) as new_CustomerID
View solution in original post
Do an inner join, and then use a concatenation with not exists().
You just need to reload the table and check if the new_CustomerId is null:
if(IsNull(new_CustomerId), Old_CustomerId, new_CustomerId) as Correcto_CustomerId
I would use ApplyMap, as that will keep the old value if there is no mapping. Create a mapping table BEFORE your main load:
Then when loading the orders:
ApplyMap('MapOldNewCustomerId', old_CustomerId) As new_CustomerId,
Hope that helps
APPLYMAP solution is fine for me
THX a lot!