T-SQL - string concatenation
问题 Hope someone can help - I am a novice SQL hacker (and very bad at it indeed!) I have two tables on SQL Server 2005 TABLE 1 and TABLE2: TABLE1 COL1 COL2 1 10 2 20 3 30 4 10 4 20 5 20 6 30 7 10 7 20 TABLE2 COL1 COL2 10 A 20 B 30 C COL2 in TABLE2 is a character representation of the numerical data in COL2 TABLE1. I hope this is understandable? I have worked out how to select COL1 and COL2 from TABLE1 and concatenate the results to show this: COL1 COL2Concat 1 10 2 20 3 30 4 10, 20 5 20 6 30 7 10