No concatenation is being done in my example. that is what is wrong. the
result I get is only one of the SkillName values. I would like all possible
SkillNames to be listed in Skills on the same row in the resultset, grouped
by fkEmployeeID.

I have tried out having and I can not see any need to use it, the problem is
still to concatenate the different text strings.

Skill table
SkillName    fkEmployeeID    ...
c++                2
perl               3
c++                5
java               2
c                     3
java                3

I want following rows in my resultset.

fkEmployeeID    Skills                ...
2                            c++, java
3                            perl, c, java
5                            c++

malfunction sql-querrie:
select concat_ws(", ",SkillName) as Skills, ..., ... from Skill, ..., ...
where ... and ... group by fkEmployeeID order by ... , ... limit 0,20;


Eva Fransson

----- Original Message -----
>
>
> Does it throw an error message or output isn't what you expected?
> In any event, did you try it with "HAVING"?
>
> I couldn't notice anything wrong from what you have there
>
>
> Cheers
>
> --
> sherzodR
>
>
> On Mon, 26 Nov 2001, Eva Fransson wrote:
>
> >I have an application with many table joins and now I would like to get
all
> >different Skills that every person in my resultset has concatenated to
one
> >string.
> >
> >I would like the code to work like this.
> >
> >select concat_ws(", ",SkillName) as Skills, ..., ... from Skill, ..., ...
> >where ... and ... group by fkEmployeeID order by ... , ... limit 0,20;
> >
> >But it dosn't! Is there some other way to fix this?
> >
> >Eva Fransson
> >


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to