Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am currently having difficulty in changing a table format in a load script: -
Natural Format:
Key | Comment |
A | Test 1 |
B | Test 2 |
C | Test 3 |
D | Test 4 |
B | Test 5 |
A | Test 6 |
C | Test 7 |
A | Test 8 |
Required Format:
Key | Comment |
A | Test 1 Test 6 Test 8 |
B | Test 2 Test 5 |
C | Test 3 Test 7 |
D | Test 4 |
Ive tried using the peek() command but I just don't seem to be able to get it to work. Any advise would be very much appreciated.
Many thanks in advance.
CONCAT should help:
LOAD
Key,
CONCAT(Comment, ', ') AS Comment
FROM ....
GROUP BY
Key;
HTH
Peter
CONCAT should help:
LOAD
Key,
CONCAT(Comment, ', ') AS Comment
FROM ....
GROUP BY
Key;
HTH
Peter
Peter,
This works perfectly. Many thanks for your help.