我在一个表4列称为RelationRecord如何在我的情况下使用SQL Server连接字符串?
RelationRecord
Parent Child1 Child2 Child3
------------------------------------
111 111 null 111
222 null null null
null 333 null null
null null null 444
555 555 555 555
我想通过逗号像下面
期待输出
111,111
222
333
444
555,555,555,555
做连击和独立
我尝试使用case
和isnull
但它不起作用。当我使用case时,查询会变得很多。有其他解决方案吗?
'1,1'是什么? –
@mohamedfaiz。 。 。参数'stuff()'。 –
它的工作。请给我'coalesce'的定义也请.. 8分钟后我会接受答案。谢谢 –