> It's a bad habbit to cc to a list.
Ooops. Sorry.

> >Of course "left join". And "group by" moreover. But how?
> >For the "group by" i need a sum-like function, which joins the strings.
>
> Hmmm, something like concat() you mean?
>

I tried it. Doesn't works.
Without group by i have this set:

id    name    c
1    user1    '50'
2    user1    'twenty-three'
3    user1    'the reason of life'
4    user2    'twenty-three'
5    user2    '303 rulz'
6    user3    NULL

I would like to get this:

1    user1    '50 - twenty-three - the reason of life'
2    user2    'twenty-three - 303 rulz'
3    user3    ''

If there is a function to sum values, why there isn't one to sum strings
i.e. concat strings. Or how should i use it?
I tried:

SQL>SELECT Table1.name, CONCAT(Table3.txt)  FROM Table1 left join Table2 on
Table1.uid=Table2.uid left join Table3 on Table2.c=Table3.c group by
Table1.name;
1    user1    '50'
2    user2    'twenty-three'
3    user3    NULL
3 rows in set (0.00 sec)

server version is 3.22.32

Z


---------------------------------------------------------------------
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