Avatar of patricka_0377
patricka_0377

asked on 

Looping without using cursors... How can I do the following...

I have the following two tables:

TABLE_A

ID |FIELD1|FIELD2
==================
1  |  A       | B
2  |  D       | E
3  |  F        | G


TABLE_B

ID| TABLE_A_ID | FIELD1
===========================
1 |     1      | H
2 |     1      | P
3 |     1      | A
3 |     2      | P


Needs to produce the following output (without using cursors)... Is this possible?

| A | B | H,P,A |
| D | B | P     |
| F | G |       |
Microsoft SQL Server

Avatar of undefined
Last Comment
Ken Selvia

8/22/2022 - Mon