Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables which are joined by "OrderID1". I want to create a table with a total "Verkoopbudget" for every "Ordernummer". As shown in the image below i have multiple 'Verkoopbudget' for the same "OrderID1". Is there a way to do this in the Data load editor?
Table 1:
- Ordernummer
- OrderID1
Table 2:
OrderID1
Verkoopbudget
This was just an example with the data you provided. Everything you need to do is to create a new table with field SUM(Verkoopbudget) AS Verkoopbudget and then use GROUP BY.
Hello! This should do:
Table_1:
LOAD * INLINE [
Ordernummer|OrderID1
2100019|2037
2100021|2039
2100023|2041
2100024|2042
]
(DELIMITER IS '|');
Table_2:
LEFT JOIN (Table_1) LOAD * INLINE [
OrderID1|Verkoopbudget
2037|989,12
2037|250
2039|7048,95
2039|12472,8
2041|720
2041|500
2042|0
]
(DELIMITER IS '|');
Table_3:
NOCONCATENATE LOAD
Ordernummer,
OrderID1,
SUM(Verkoopbudget) AS Verkoopbudget
RESIDENT Table_1
GROUP BY Ordernummer, OrderID1;
DROP TABLE Table_1;
Next time please put a sample data file with your question. 😉
Thank you for your solution, but this was only a small sample of the data. As of right now there are hundreds of orders and still growing. So having to manually add data to the inline tables is not what i'm looking for.
This was just an example with the data you provided. Everything you need to do is to create a new table with field SUM(Verkoopbudget) AS Verkoopbudget and then use GROUP BY.