I have one to many joined table like below and what I like to do is to create a new table to show multi 'ZONE' value per one 'TAXLOT' id. It seems like I gotta do two loop and insert distinct zone value into a new table. I'm very novice t-sql guy and any help will be great!!
Table Name: INPUT
TID -- ZONE
1 ----- A
1 ----- A
1 ----- B
1 ----- C
2 ----- D
2 ----- E
2 ----- F
2 ----- F
3 ----- A
3 ----- B
4 ----- C
Desirable Output table: Output
TID -- ZONE
1 ----- A, B, C
2 ----- D, E, F
3 ----- A, B
4 ----- C
Any help will be appreciated!