1. Jochen Peters
  2. Valentina Database ADK
  3. 木, 3月 10 2016, 10:58 PM
  4.  メールで購読
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.
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.
Jochen Peters 承諾済みの回答
Francois,

Excellent!

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

Many thanks,
Dennis
コメント
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. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories