With MSSQL you can do something like this:
declare @result varchar(500)
set @result=""
select @result = @result + ModuleValue + ', '
from TableX where ModuleId = @ModuleId
More Related Contents:
- SQL comma-separated row with Group By clause
- Insert an image in a column of a table that already has 5 columns
- Get top 1 row of each group
- How to use GROUP BY to concatenate strings in SQL Server?
- Referring to a Column Alias in a WHERE Clause
- Convert Month Number to Month Name Function in SQL
- How to avoid the “divide by zero” error in SQL?
- SET versus SELECT when assigning variables?
- Is there any difference between IS NULL and =NULL
- Generate a resultset of incrementing dates in TSQL
- Real life example, when to use OUTER / CROSS APPLY in SQL
- Getting result of dynamic SQL into a variable for sql-server
- How to get difference between two rows for a column field?
- Better techniques for trimming leading zeros in SQL Server?
- How to print VARCHAR(MAX) using Print Statement?
- SQL statement to select all rows from previous day
- What’s the best way to select the minimum value from several columns?
- Splitting delimited values in a SQL column into multiple rows
- How to insert a blob into a database using sql server management studio
- SQL GROUP BY CASE statement with aggregate function
- separate comma separated values and store in table in sql server
- Best way to do nested case statement logic in SQL Server
- How to check which locks are held on a table
- Execution sequence of Group By, Having and Where clause in SQL Server?
- SQL Script to alter ALL Foreign Keys to add ON DELETE CASCADE
- Is it possible to execute a text file from SQL query?
- Use variable with TOP in select statement in SQL Server without making it dynamic [duplicate]
- SQL query to group by day
- How do I find the data directory for a SQL Server instance?
- Compare dates in T-SQL, ignoring the time part