I cant seem to get the syntax right, anyone help? it returns the error :-
Line 5 Incorrect syntax near ''.
declare @sql nvarchar(1000)
select @sql = '' create table ey_report_temp (
county nvarchar(100),
fname nvarchar(100), '' + STUFF((SELECT distinct '','' + sport + '' nvarchar(10) ''
FROM ey_report
FOR XML PATH('''')
), 1, 1, '''') + '')''
SQL2000