I have the following tables, I would like to obtain the result which I mention in the example. I hope you can guide me a little. Thanks.
Tabla: TR
| idt | vt |
-------------
| 1 | 1101 |
| 2 | 1102 |
| 3 | 1103 |
-------------
Tabla TE
| ide | ve | idt
------------------
| 1 | E101 | 1 |
| 2 | E102 | 1 |
| 3 | E103 | 2 |
| 4 | E104 | 3 |
------------------
Al hacer el INNER entre TR y TE
| idt | vt | ve
------------------
| 1 | 1101 | E101 |
| 1 | 1101 | E102 |
| 2 | 1102 | E103 |
| 3 | 1103 | E104 |
----------------------
Lo que quiero obtener es lo siguiente:
| idt | vt | ve ve2
---------------------------
| 1 | 1101 | E101 | E102
| 2 | 1102 | E103 |
| 3 | 1103 | E104 |
----------------------