Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a simple Distributor/Retailer sales setup as shown below:
Retailer & Distributor Table are Customer profiles and the *_Qty tables are sales data. The NRV_Points table has prices and points.
I want to get Dist_State corresponding to the Ret_ID for every record in the Retailer_Qty table.
I am using the below script for this:
Inner Join (Retailer_Qty)
LOAD Distinct
Dist_State as Ret_Qty_Dist_State
Resident Distributor;
This script is creating multiple values for every single Ret_ID (one for every state) in the Retailer_Qty table.
Not sure where the error/issue is.
Looking for some help on this.
You should have a key while joining
Inner Join (Retailer_Qty)
LOAD Distinct
Ret_ID,
Dist_D
resident
Retailer;
inner join
LOAD distinct,
Dist_D,
Dist_State as Ret_Qty_Dist_State
Resident Distributor;
drop fields Dist_D from Retailer_Qty;
You should have a key while joining
Inner Join (Retailer_Qty)
LOAD Distinct
Ret_ID,
Dist_D
resident
Retailer;
inner join
LOAD distinct,
Dist_D,
Dist_State as Ret_Qty_Dist_State
Resident Distributor;
drop fields Dist_D from Retailer_Qty;
Thanks Clever Anjos
This worked