Book a Demo

Author Topic: [RESOLVED][SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)  (Read 5510 times)

YanDJ

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Hello,

I generate automaticaly ours design with EA and an SQL Fragment.
I am able to retrieve an list of tag value with the same name and rename as "dependencies" with the following code:
Code: [Select]
GROUP_CONCAT( DISTINCT optag4.value ORDER BY optag4.ElementID DESC SEPARATOR ', ') AS dependencies,
But the query works well but when I have too many characters (> 1024 char) the GROUP_CONCAT stop concat all my tag value with the same name.
I found that in mySQL, I have to write in my query :
Code: [Select]
SET SESSION group_concat_max_len = 1000000;
But when I try to set, the querry do nothing and return nothing.

Has anyone ever had this problem before?

Thank You

Yan

EDIT: The subject have been resolved by changing the configuration of the server :
I've changed the file "my.ini" in the repository C:\ProgramData\MySQL\MySQL Server 8.0

To add the line :
Code: [Select]
group_concat_max_len=25000
« Last Edit: August 13, 2020, 07:36:25 pm by YanDJ »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8090
  • Karma: +118/-20
    • View Profile
Re: [SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)
« Reply #1 on: March 31, 2020, 08:36:01 am »
I found that in mySQL, I have to write in my query :
Code: [Select]
SET SESSION group_concat_max_len = 1000000;
You will need to execute that in the MySQL admin console (or whatever it's called). EA won't execute it for you.

YanDJ

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: [SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)
« Reply #2 on: April 02, 2020, 03:57:38 am »
Ok thank you for the informations Eve, we will try to change it in ours server.
Yan

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1173
  • Karma: +30/-8
    • View Profile
Re: [SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)
« Reply #3 on: April 03, 2020, 03:21:12 am »
Have you tried creating a MySQL store procedure or, even better, a view and calling it from Sparx?