![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I would like to create an sql select that listed all group records as a concatenated string, but I just can not work out how to do it. eg Table1 Clothes Colours COLOUR red blue green yellow Table2 Clothes COLOUR ITEM red pullover green jumper green trousers yellow shirt red hat red scarf red coat I want to be able to create a Select with two fields COLOUR, ITEMs, which does the following, where ITEMS is concatenated from each matching group record in Table2 by COLOUR COLOUR ITEMS red pullover: hat: scarf: coat green jumper: trousers yellow shirt I hope I have explained it correctly. Any help or pointers, would be most appreciated, even if it is - NOT POSSIBLE Thanks Richard |
|
projid | projname | +--------+----------+ 1 | Bravo | 2 | Alhpa | 3 | Omega | +--------+----------+ |
|
k | projid | @name:=concat(@name,': ',projname) | +---+--------+------------------------------------+ 1 | 1 | : Bravo | 0 | 2 | : Bravo: Alhpa | 1 | 3 | : Bravo: Alhpa: Omega | +---+--------+------------------------------------+ |
#3
| |||
| |||
|
|
I would like to create an sql select that listed all group records as a concatenated string, but I just can not work out how to do it. eg Table1 Clothes Colours COLOUR red blue green yellow Table2 Clothes COLOUR ITEM red pullover green jumper green trousers yellow shirt red hat red scarf red coat I want to be able to create a Select with two fields COLOUR, ITEMs, which does the following, where ITEMS is concatenated from each matching group record in Table2 by COLOUR COLOUR ITEMS red pullover: hat: scarf: coat green jumper: trousers yellow shirt I hope I have explained it correctly. Any help or pointers, would be most appreciated, even if it is - NOT POSSIBLE |
![]() |
| Thread Tools | |
| Display Modes | |
| |