Group_concat不是内置函数 - HeidiSQL

时间:2017-08-16 03:47:31

标签: sql sql-server group-concat sql-server-group-concat

我有一个包含group_concat的查询,但它返回一个错误,即group_concat不是内置函数。请帮我解决这个问题。我的查询是这样的:

 SELECT cast(user_id as varchar(255)) AS member_id,skincareproductbarcode.barcode, skincareproduct.SCP_id, skincabinet.beautybox_id,  
        skincabinet.skpid, skincareproduct.photos, skincabinet.create_date, GROUP_CONCAT(MirrorProfile.serial_number, '') As Serial_Number
         from skincabinet join skincareproduct on skincareproduct.scp_id = skincabinet.skpid 
         full join skincareproductbarcode on skincabinet.skpid = skincareproductbarcode.scp_id
          full join membermirrorprofile on skincabinet.user_id = membermirrorprofile.member_id
           full join mirrorprofile on MemberMirrorProfile.mirror_id = mirrorProfile.mirror_id 
             where skincareproduct.approval_flag = 'N' and skincareproduct.photos != '' 
             and substring(photos,52,3) = 'scp' order by skincareproduct.SCP_id  group by skincareproduct.scp_id desc

我如何使用group_concat或有其他方法吗?

1 个答案:

答案 0 :(得分:0)

字段的连接不应该是SQL查询的输出。它不是为此而做的。使用接收数据的工具来执行此操作。