SQL, How to Concatenate results?

前端 未结 7 1955
渐次进展
渐次进展 2020-11-29 08:08

I currently have a SQL query that returns a number of fields. I need one f the fields to be effectively a sub query sub that.

The Problem in detail:

7条回答
  •  天涯浪人
    2020-11-29 08:42

    With MSSQL you can do something like this:

    declare @result varchar(500)
    set @result = ''
    select @result = @result + ModuleValue + ', ' 
    from TableX where ModuleId = @ModuleId
    

提交回复
热议问题