Du mangler betingelsen i underforespørgslen.
SELECT t2.Id, STUFF((SELECT ',' + CAST(VALUE AS varchar) FROM @MyTable t1 where t1.Id =t2.ID FOR XML PATH('')), 1 ,1, '') AS ValueList
FROM @MyTable t2
GROUP BY t2.Id
Demo
Du mangler betingelsen i underforespørgslen.
SELECT t2.Id, STUFF((SELECT ',' + CAST(VALUE AS varchar) FROM @MyTable t1 where t1.Id =t2.ID FOR XML PATH('')), 1 ,1, '') AS ValueList
FROM @MyTable t2
GROUP BY t2.Id
Demo
Sådan opsummeres tidsfeltet i SQL Server
Webinar:Banking on Postgres – Finansielle ansøgningsovervejelser [Opfølgning]
Fix:"Sætningen BACKUP LOG er ikke tilladt, mens gendannelsesmodellen er SIMPLE" i SQL Server (og SQL Edge)
sqlalchemy.exc.NoSuchModuleError:Kan ikke indlæse plugin:sqlalchemy.dialects:postgres