我有查詢產生以下結果:合併兩行合併到一列
GUID ClientGUID TASK VALUE
========================= ===============================================
123 15757400200 Dollar Unit Consult Time 15 Min (Quantity):1
123 15757400200 Dollar Unit Patient/Family Education 15 min
456 15757400200 Swallow Clarification Swallow therapy 30 min (Qty):1
我希望獲得下面的結果:
GUID ClientGUID TASK VALUE
123 15757400200 Dollar Unit Consult Time 15 Min (Quantity):1 ; Patient/Family Education 15 min (Qty):1
456 15757400200 Swallow Clarification Swallow therapy 30 min (Qty):1
您可以按照發布 在這個堆棧的其他交易所模式http://stackoverflow.com/questions/5031204/does-t-sql-have-an-aggregate-function-to-concatenate-strings/ 5031297#5031297 – grambo25