这是我的桌子-
item item_id components
chair 1001 wood
chair 1001 screw
chair 1001 paint
book 1002 pages
book 1002 bind
基于item和item_id,我想使用逗号(,)将组件连接在一起.例如,我应该得到以下输出
item item_id components
chair 1001 wood,screw,paint
book 1002 pages,bind
下面是我现在拥有的代码.我正在SFMC上运行此程序,但收到错误- Error saving the Query field.Incorrect syntax near 'SEPARATOR'个
SELECT item_id, GROUP_CONCAT(components SEPARATOR ',')
FROM table
GROUP BY item_id
有没有人能帮我找到一种方法来运行这个查询而不出错,并得到想要的结果?