Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I here has a question again. Assume I has following Inline table:
A:
LOAD * INLINE [
ID, PRO
A1, CA
A1, SA
A1, CA
A1, FD
A2, SA
A3, CA
A4, CA
A4, SA
A5, SA
A5, FD
A6, FD
A6, CA
];
How can I come out with this result by using scripting?
Result:
ID | Total Product |
A1 | CA & SA & FD |
A2 | SA |
A3 | CA |
A4 | CA & SA |
A5 | SA & FD |
A6 | FD & CA |
Thanks for help.
Regards.
Try this:
A:
LOAD ID,
Concat(DISTINCT PRO, ' & ') as [Total Product]
Group By ID;
LOAD * INLINE [
ID, PRO
A1, CA
A1, SA
A1, CA
A1, FD
A2, SA
A3, CA
A4, CA
A4, SA
A5, SA
A5, FD
A6, FD
A6, CA
];
Try this:
A:
LOAD ID,
Concat(DISTINCT PRO, ' & ') as [Total Product]
Group By ID;
LOAD * INLINE [
ID, PRO
A1, CA
A1, SA
A1, CA
A1, FD
A2, SA
A3, CA
A4, CA
A4, SA
A5, SA
A5, FD
A6, FD
A6, CA
];
Hi Sunny,
I get the correct answer.Thanks for help.
Regards.