Subject Full Outer Joins
Author Gerhardus Geldenhuis
Hi
I have the following query:
select
B.Diary_Date,
B.Department,
B.Darno_Rono,
B.ScreenName,
B.ProductionReworkCycle,
B.JobDescription,
B.DateCompleted,
B.Diary_Count
from Diary_SelectB(:In_Date,:In_User) B full join
Diary_SelectA(:In_Date,:In_User) A on A.Department=B.Department

It returns null values for Diary_SelectA. According to the Embedded SQL
Guide the on clause should be ignored. I have inserted an "on" clause
because the query won't work without. The two procedure results I join
does not have any rows in commen. I just want to glue together two
resultsets. If I swap the query like this the other sp-resultset becomes
null.

select
B.Diary_Date,
...
from Diary_SelectA(:In_Date,:In_User) B full join
Diary_SelectB(:In_Date,:In_User) A on A.Department=B.Department

The question then is why do this happen. How do I get the correct
resultset.

Diary_SelectA and Diary_SelectB have exactly the same output paramters.

Second question according to the example in the Embedded SQL Guide you
dont even need an "on" clause why does it not work without one.
Eg

select
B.Diary_Date,
...
from Diary_SelectA(:In_Date,:In_User) B full join
Diary_SelectB(:In_Date,:In_User) A

This should work if I read the example correctly.

Any help appreciated.


(
The example is on page 160
select distinct cit.city, cou,capital, n.parkcity
from (cities cit full join countries cou) full
join national_parks n;
)

Groete
Gerhardus