FYI: I'm using SQL Server
.
I have a table where I query for one column but it may contain multiple records:
SELECT CodeNumber
FROM Books
WHERE Type='Children'
CodeNumer
---------
A
B
C
D
E
I want to PIVOT
the table and concatenate the column data into a computed column such that it looks like this:
ComputedColumn
--------------
A; B; C; D; E;
I'm open to using something else other than pivot in the query. I'd prefer not to write a stored procedure which will perform this action.
Thank you for any help.