1. Jochen Peters
  2. Valentina Database ADK
  3. Четверг, Март 10 2016, 10:58 PM
  4.  Подписаться через email
Hello,
While I'm quite comfortable to use SQL up to medium level it's one field that gives me grey hair and poor sleep, self join.

Below is the table and its structure with some data: SQLTable1.png
The second screen shot is the result that I want to achieve after executing the SQL question.

However, I do I get the SQL SELECT statement right?

TIA,
Dennis
Вложения
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
Francois,

Excellent!

It worked great after adding GROUP_CONCAT(FullName SEPARATOR '')

Many thanks,
Dennis
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
You can use the aggregative Function "GROUP_CONCAT" (more deatils on the WIKI) as this :

SELECT TypeID, DisplayName, GROUP_CONCAT(FullName,' ') As FullName FROM myTable GROUP BY TypeID, DisplayName

Best Regards
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories