Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am linking two tables based on key
Trim(Replace("STORE",'Showroom','')) & PRODUCT & PRICE_BAND AS Stock_Key,
But some of the price bands are missing in one of the table. Due to which that pricebands are not coming in the value.
In screenshot, I want same price bands to be shown in both the columns (PRICEBAND_DIN & PRICE_BAND_STK_D).
How to get already the records.
Thanks
It sounds like you may need an intersection table to ensure you have all Price Bands for all keys.
On both of the tables you are joining, create the key as you are presently doing, but do not load the STORE, Product or Price Band fields - only have the key.
Then load an intersection table with just those fields concatenated from both tables:
Intersection:
LOAD
Trim(Replace("STORE",'Showroom','')) & PRODUCT & PRICE_BAND AS Stock_Key,
Trim(Replace("STORE",'Showroom','')) as STORE,
PRODUCT,
PRICE_BAND
FROM ... your DIN table ...;
CONCATENATE(Intersection)
LOAD
Trim(Replace("STORE",'Showroom','')) & PRODUCT & PRICE_BAND AS Stock_Key,
Trim(Replace("STORE",'Showroom','')) as STORE,
PRODUCT,
PRICE_BAND
FROM ... your STK table ...;
There may be other fields that should reside in the intersection table also, that do not have to be part of the key.
Hope that makes sense?
Steve