0

How do I get full outer join in TimesTen DB?

I tried this:

select t1.column1, t2.column2 
from table1 t1 
full outer join table2 t2 on t1.column1 = t2.column2;

This works in Oracle but when I run it against TimesTen it throws an error, that there is problem before "full".

philipxy
  • 14,867
  • 6
  • 39
  • 83
Jakub Znamenáček
  • 766
  • 1
  • 4
  • 18
  • 1
    Please before considering posting: Pin down code issues via [mre]. Read the manual/reference & google any error message & many clear, concise & precise phrasings of your question/problem/goal, with & without your particular names/strings/numbers, 'site:stackoverflow.com' & tags; read many answers. Reflect research in posts. SO/SE search is poor & literal & unusual, read the help. Google re googling/searching, including Q&A at [meta] & [meta.se]. [How much research effort is expected of Stack Overflow users?](https://meta.stackoverflow.com/q/261592/3404097) [ask] [Help] – philipxy Sep 19 '22 at 11:50

1 Answers1

0

It looks like full outer join is not supported in TimesTen based on the documentation (page 547). I have found alternative which returns same result using left join, right join and union.

select *
from (
        select t1.column1, t2.column2 
        from table1 t1 
            left join table2 t2 on t1.column1 = t2.column2
        union
        select t1.column1, t2.column2 
        from table1 t1 
            right join table2 t2 on t1.column1 = t2.column2
     )
Jakub Znamenáček
  • 766
  • 1
  • 4
  • 18
  • That is not correct. FULL JOIN ON returns INNER JOIN ON rows UNION ALL unmatched left & right table rows extended by NULLs. – philipxy Sep 19 '22 at 11:49