0

I want to do a group concat with multiple columns inside it. This is the query I have(I want to know if it is possible, and if not, what other way can I do this?:

select  group.groupname, 
        group_concat(machine.machinename,'--',machine.machineModel) 
    inner join etc....
0

1 Answer 1

1

You need to first concatenate those values and then do group_concat.

select  group.groupname, 
        group_concat(machine.machinename||'--'||machine.machineModel)) 
    inner join etc....
Sign up to request clarification or add additional context in comments.

4 Comments

no such function: concat: select this is the error thar is giving me @Rams
this is mysqlite, I assume is the same as Mysql
I have change it to || symbol for concatenation of two values
Thanks :) great help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.