我可以问一下下面的sql,有没有一种方法可以为结果的每一列添加一个逗号。非常感谢你
SELECT convert(nvarchar(16) , fcp.ServicePointID) as ServicePointID
, convert(nvarchar(15), fcp.ChannelNumber) as channelNumber
, convert(nvarchar(20), recordingdevice.recordingdeviceid) as RecordingDeviceID
, RegisterReading.DataValue as DataValue
, convert(nvarchar(25), dateadd(hh, 8, RegisterReading.EndTime), 120) as EndTime
, convert(nvarchar(25), dateadd(hh, 8, ReadingGroup.ReceivedTime), 120) as ReceivedTime
FROM RegisterReading (nolock)
servicepointid通道号1、098、2、099、3、010,
1条答案
按热度按时间d7v8vwbk1#
对于每列:concat(convert(nvarchar(16),column),',')as columnalias