Souvik,
I am not sure I understand, you may want to play around with distinct
keyword if you want to join on unique values.
In any case, it looks like you've got it figured out already, so it's all
good:-)
Happy trails!
Mark
On Sat, Dec 29, 2012 at 2:19 PM, Souvik Banerjee
wrote:
> Thanks Mark f
Thanks Mark for writing back to me.
I did the same thing and still not getting the desired result.
I was looking for the cause. I managed to get the desired result. Sharing
my thought process and how I did it. Let me know your thoughts on this,
that would be really nice to have. Also please share a
Souvik,
In your new example, you need a RIGHT OUTER JOIN between table1 and table2
(order matters - table1 on left, table2 on right) on the ID1 column.
Something like this (untested by me):
SELECT
table1.*,
table2.*
FROM
table1
RIGHT OUTER JOIN table2
ON (table1.id=table2.id_1);
Mar
Thanks a lot Mark for your attention.
But I think I cannot go for INNER join, the reason behind the fact being
that I want all rows of Table3 irrespective of there is any row
corresponding to that ID in Table 1 or Table 2.
Probably I would have taken care of that while providing the example.
The mo
Souvik,
Let me begin by saying that simplifying the problem goes a long way in
helping us answer your question. You did it really nicely here, so thank
you for doing that.
Why don't you use INNER JOIN instead of LEFT SEMI JOIN? You can express the
same query as INNER JOIN with no restrictions on w