question

mike jun 1 avatar image
mike jun 1 asked

Field calculation

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!

t-sqlqueryinsertgroup-by
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Squirrel 1 avatar image
Squirrel 1 answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.