Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I was recently struggling with a piece of code joining customer data to sales data.
I finally managed to get it work, but I still wonder about it.
Below you see two versions of what I consider to be the same code.
V1 is working as expected, V2 not.
(Simplified you can imagine Sales having three columns: TransactionID, Revenue, CustomerID)
V2 'ignored' the 'distinct', thus the number of transactions got multiplied.
My question: What is the (internal) difference?
// - V1 -----------------------------------------------C:LOAD Distinct CustomerID, CustomerNameResident Customers;
left join(Sales)load * Resident C;drop table C;
// - V2 -----------------------------------------------left join (Sales)LOAD Distinct CustomerID, CustomerNameResident Customers;
Thanks for any ideas,
Thilo