Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

help with group_concat

Hi

Please can you advise the correct syntax as neither of the queries below work. I would like to perform a regex on the results of the group_concat function

select group_concat(col) `temp` from table where temp REGEX 'test' group by id;
unknown column temp in where clause

select group_concat(col) `temp` from table where group_concat(col) REGEX 'test' group by id;
invalid use of group function

thanks
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andieje
andieje

ASKER

I get a syntax error for any query with

having colnname REGEX 'exp';

or

having group_concat(colname) REGEX 'exp';

after the group by clause
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andieje

ASKER

I'd missed off the 'P'