|
ChelleMcG
Starting Member
United Kingdom
1 Posts |
Posted - 02/22/2013 : 09:30:22
|
I've inherited a very complicated-looking view which uses CTE, CASE and PIVOT and I need to include some additional data. Multiple rows with data in one column, VisitType, is being split by way of a case statement and then pivoted across 8 columns with each containing the date of the visit.
In another related table I have a column ImageType and each row can contain either 1, 2 or 3 to record which images were taken at each visit. Is it possible to concatenate this image data with those dates, so that column 'Visit 1' would contain '2013-02-22 1,2,3' to show that on this date 3 images were taken?
Only been working with SQL Server for a week so any help would be greatly appreciated. |
|