Error When Executing Insert Into Select: Some Rows Were Cut by GROUP_CONCAT

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Insert Into select 时报错:Some rows were cut by GROUPCONCAT

| username: Zealot

[TiDB Usage Environment] Production Environment
[TiDB Version] 7.1.2

insert into dw_layer.dw_kboss_conm_pro(id, contractnumber, product)
SELECT as conmid, conm.contractnumber, GROUP_CONCAT(product.cpjc) as product
FROM tb_product product
left join tb_conm conm on FIND_IN_SET(, conm.productpackage)
group by

Execution error: > 1260 - Some rows were cut by GROUPCONCAT(Column#0)

Executing the select statement alone can successfully run and return results.

| username: Zealot | Original post link

The issue has been resolved by setting SET @@session.group_concat_max_len = 1024000;.

| username: dba远航 | Original post link

Yes, we have also learned.

| username: TiDBer_lBAxWjWQ | Original post link

Learned a lot, thank you.

| username: zhanggame1 | Original post link


| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.