Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
Suppose I have 3 tables which are making circular reference.
Orders
---------------------------
OrderId
siteId
OrderLines
---------------------------
OrderId
ItemId
Discounts
---------------------------
siteid
ItemId
Discount
Now Discounts table have to be joined with both tables Orders and OrderLines and Orders and OrderLines should also join. i want to keep all 3 tables. and want to get discount based on siteid and itemid.
Regards,
Zahid Rahim
Hi,
Try below methods
Method 1:
By renaming column name siteId from Dsicount table.
Method 2: by using join
Orders:
LOAD * INLINE [
OrderId, siteId
100, 1
101, 2
103, 3
];
inner join (Orders)
LOAD * INLINE [
OrderId, ItemId
100, 200
101, 300
103, 400
];
Inner Join(Orders)
LOAD * INLINE [
siteId, ItemId, Discount
1, 200, 15
2, 300, 20
3, 400, 30
];