1. Jochen Peters
  2. Valentina Database ADK
  3. Donnerstag, März 10 2016, 10:58 PM
  4.  Abonnieren via E-Mail
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
Anhänge
Kommentar
There are no comments made yet.
François Van Lerberghe Akzeptierte Antwort
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
Kommentar
There are no comments made yet.
Jochen Peters Akzeptierte Antwort
Francois,

Excellent!

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

Many thanks,
Dennis
Kommentar
There are no comments made yet.
  • Seite :
  • 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