Hi all,
I’m getting stuck with a JOIn problem and I hope, that anyone can help me with it. I have 3 different data-sources and I want to join the data. One source is a table with replies which depend on comments, one table with comments on posts and one table with posts. The dependence of each is like the following:
Posts (id, messagePost)
|
Comments (id, postsId, messageComment)
|
Replies (id, commentsId, messageReply)
The posts can have comments. The comments can have replies.
If I join the data via Left Outer Join it doesn’t work like I want The problem is, that it could exists 0 or n- comments for a post as well as 0 or n- replies for a post. For example if I join the comments with the Left Outer Join on the posts and there is one post with a couple of deppending comments the result is only one row with the first depending comment. How do I make a fitting Join to have all data in the result? I hope u understand what I mean. It would be really if someone could help me with that!
Thank you,
Peter