0

我有以下查询在我的本地数据库中工作,但不在生产中。谁能帮帮我:

declare @abc varchar(max)
set @abc = (select distinct stuff((select ',' + emp_id from TableA FOR XML PATH ('')),1,1, '') From TableA
print @abc

本地的结果集是:

abc
123,432,6789,2345

但在生产中:

abc
----- results only with commas and 1's.
4

0 回答 0