Not sure what you mean there Luis. There could be 300 different columns in the ReportColumns table and I wasn't sure how best to link them all together
I didn't want to add 300 possible columns to the report definitions table...
Here's what i came up with so far but thought maybe there'd be a better way SELECT rd.ReportID,
(SELECT STUFF((SELECT ',' + ReportColumnValue
FROM #ReportColumns WHERE ReportColumnID
IN (SELECT Value FROM F1Settings.dbo.fx_ParseToTable (ReportColumns, ','))
FOR XML PATH('')) ,1,1,'') AS COLUMNS)
FROM #ReportDefinition rd
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience