Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi !
I have a "design" question.
Lets say I have 2 tables of data
Table1:
OrderNo | Orderdate | PartNo's |
---|---|---|
12345 | 2017-02-10 |
Table2:
Orderno | PartNo |
---|---|
12345 | 77 |
12345 | 88 |
12345 | 99 |
Wanted Result:
OrderNo | OrderDate | PartNo's |
---|---|---|
12345 | 2017-02-10 | 77,88,99 |
How to fix this , any ideas ??
Regards Pär
Here is a sample script and app attached
Table1:
LOAD * INLINE [
OrderNo, Orderdate
12345, 2017-02-10
];
Left Join (Table1)
LOAD OrderNo,
Concat(PartNo, ', ') as PartNos
Group By OrderNo;
LOAD * INLINE [
OrderNo, PartNo
12345, 77
12345, 88
12345, 99
];
May be this:
Table1:
LOAD OrderNo,
Orderdate
FROM Table1;
Left Join (Table1)
LOAD OrderNo,
Concat(PartNo, ', ') as PartNos
FROM Table2
Group By OrderNo;
Here is a sample script and app attached
Table1:
LOAD * INLINE [
OrderNo, Orderdate
12345, 2017-02-10
];
Left Join (Table1)
LOAD OrderNo,
Concat(PartNo, ', ') as PartNos
Group By OrderNo;
LOAD * INLINE [
OrderNo, PartNo
12345, 77
12345, 88
12345, 99
];
Thanks Sunny !!
I tried your first answer and it works exactly as I wanted it to
I haven't written question into this forum for a couple of years , and now , when I did , I get the correct answer in just a couple of minutes.... OMG ...
Thanks again !
/Pär