Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this code from one of my course I am taking. I need help in understanding the flow in which the statements will get executed. Can you please help and also explain why ?
From what I understand, the Order_temp table gets loaded and then used as resident load . My understanding is the final result will NOT have the join results. If you think, it will have the join results, then I am unclear on the flow of the statement execution. I think I am lacking there.
Orders_temp:
LOAD `Courier Website`,
`Customer ID`,
`Employee ID`,
`Order Amount`,
`Order Date`,
`Order ID`,
`Payment Received`,
`PO#`,
`Required Date`,
`Ship Date`;
SQL SELECT `Courier Website`,
`Customer ID`,
`Employee ID`,
`Order Amount`,
`Order Date`,
`Order ID`,
`Payment Received`,
`PO#`,
`Required Date`,
`Ship Date`
FROM Orders;
LIB CONNECT TO 'db_1';
left join(Orders_temp)
LOAD `Order ID`,
`Product ID`,
Quantity,
`Unit Price`;
SQL SELECT `Order ID`,
`Product ID`,
Quantity,
`Unit Price`
FROM `Orders Detail`;
Orders:
Load *,
[Order Date] & '|' & [Product ID] as %LinkKey
Resident Orders_temp
;
drop table Orders_temp
;
Orders_temp will be have all the fields orders and orders_detail. See the Left Join example.
Orders_temp will be have all the fields orders and orders_detail. See the Left Join example.
Thanks Jwjacko.