Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL/Oracle Server, Full Outer Join and 3 or more Tables
    primarykey
    data
    text
    <p>I got a little problem.</p> <p>I'm using Full outer Join in Sql server - so far it works but now I add a table and it doesn't work as it should.</p> <p>Here is my code:</p> <pre><code>SELECT * FROM Table1 h , (db1..Table2 s FULL OUTER JOIN db1..Table3 k on k.attributT3_1 = s.attributT2_1 and left(k.attributT3_2,4) = year(s.attributT2_2) and substring(k.attributT3_2,6,1) = s.attributT2_2 and (case when k.attributT3_3 = 0 and k.attributT3_4 = 11 then 10 when k.attributT3_3 = 0 and k.attributT3_4 = 14 then 40 when k.attributT3_3 = 0 and k.attributT3_4 = 16 then 60 when k.attributT3_3 = 0 and k.attributT3_4 = 90 then 10 when k.attributT3_3 = 1 and k.attributT3_4 = 11 then 11 when k.attributT3_3 = 2 and k.attributT3_4 = 11 then 12 when k.attributT3_3 = 4 and k.attributT3_4 = 11 then 14 when k.attributT3_3 = 7 and k.attributT3_4 = 11 then 17 else k.attributT3_3 end) = s.attributT2_3) where h.attributT1_1 = k.attributT3_1 and s.attributT3_1 = ' 260585' and h.attributT1_2 = 055 </code></pre> <p>That's my SQL, may be a little bit confusing^^</p> <p>My problem here is FULL OUTER JOIN doesn't work because I added Table1, because there are some infos I need and now FULL OUTER JOIN works like LEFT OUTER JOIN.</p> <p>It is also possible that I need to add one or 2 more Tables in this FULL OUTER JOIN.</p> <p>Does anyone have an idea how I could get it to work? (and yeah I know I could use 2 left outer joins and an union and make it work but that's not what I want to do)</p> <p>btw the script sould work on oracle too :D</p> <p>the output should be like this: <a href="http://img402.imageshack.us/img402/4618/bildwq.jpg" rel="nofollow noreferrer">http://img402.imageshack.us/img402/4618/bildwq.jpg</a></p> <p>Column1 = Table1 Column2 = Table2 Column3 = Table3</p> <p>the null values do not exist on the table </p> <p>my script does the same except u cant see the rows in column 2 with nulls</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload