一条sql语句在delphi中输出的结果出现错误
llqbc 2011-05-01 04:36:32 数据库
c1 c2
1 a
2 b
1 f
1 n
希望查询为
c1 c2
1 a,f,n
2 b
在 server 2005 中用以下语句正常输出上述结果
select c1,c2=stuff((select ','+c2 from aa t where c1=aa.c1 for xml path('')), 1, 1,'') from aa group by c1'
但在delphi中结果变为:
c1 c2
1 [memo]
2 [memo]
怎么办?