Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following table
DOCNUM | FLAG_SDATA | ITEM | DATA | STORE | PSGNUM | SEGNUM |
80331833 | 6 | 1202330 | 6 | |||
80331833 | 6 | 12 PCE | 8100 | 6 | ||
80331833 | 9 | 1206282 | 9 | |||
80331833 | 9 | 12 PCE | 8100 | 9 | ||
80331833 | 12 | 1207595 | 12 | |||
80331833 | 12 | 12 PCE | 8100 | 12 | ||
80331833 | 15 | 1212852 | 15 | |||
80331833 | 15 | 12 PCE | 8100 | 15 | ||
80331833 | 18 | 1212914 | 18 | |||
80331833 | 18 | 18 PCE | 8100 | 18 |
How can i transform the table into the following form in the script not in a chart
DOCNUM | FLAG_SDATA | ITEM | DATA | STORE |
80331833 | 6 | 1202330 | 12 PCE | 8100 |
80331833 | 9 | 1206282 | 12 PCE | 8100 |
80331833 | 12 | 1207595 | 12 PCE | 8100 |
80331833 | 15 | 1212852 | 12 PCE | 8100 |
80331833 | 18 | 1212914 | 18 PCE | 8100 |
Has anyone an idea ?
Thank you i advance.
You could use the Only() aggregation on fields ITEM, DATA and STORE in a resident load grouping by DOCNUM and FLAG_SDATA, but I think you should why this table was created like this in the first place.
Maybe you just have to replace a concatenation with a join, thus avoiding the question of how to combine these multiple rows.
hope this helps
Marco