T SQL在SQL Compact中不起作用

时间:2014-04-05 11:07:36

标签: tsql

我在SQlCompact数据库中使用了一个T-Sql,但它无法正常工作,而stuff()用于在单元格中收集值。

这是select语句,但它显示错误:

SELECT        Pepole.ID, Pepole.FNA, Pepole.LNA, STUFF
                             ((SELECT        ', ' + Name AS Expr1
                                 FROM            Special AS S2
                                 WHERE        (ID = PeopleTarget_1.SpecialID) FOR XML PATH('')),,,) AS Names
FROM            Pepole INNER JOIN
                         PeopleTarget AS PeopleTarget_1 ON Pepole.ID = PeopleTarget_1.PeopleID INNER JOIN
                         Special AS Special_1 ON PeopleTarget_1.PeopleID = Special_1.ID 

0 个答案:

没有答案