I would like to transform the first table, which is a result of a query, into the second table. At the first table, every value from the Y column has a value from the X, which can be the same. In the second table, I would like to reach that every X value will be a column with its own data from the Y column value. Could anyone send me a little note how to do that? Thank you.
Table First Table Second
---------- ------------------
| X | Y | | A | B | C | D |
---------- ------------------
| A | 1 | | 1 | 2 | 6 | 10 |
| B | 2 | | 1 | 3 | 7 | 11 |
| B | 3 | ==> | 1 | 4 | 8 | 12 |
| B | 4 | | 1 | 5 | 9 | 13 |
| B | 5 |
| C | 6 |
| C | 7 |
| C | 8 |
| C | 9 |
| D | 10 |
| D | 11 |
| D | 12 |
| D | 13 |
----------