Kbase P21015: How to make FULL JOIN with Progress SQL-92 ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
GOAL:
How to make FULL JOIN with Progress SQL-92 ?
FACT(s) (Environment):
Progress 9.x
FIX:
Assuming 2 Tables (People and TypePeople) and its Data have been created using the following statements:
create table people (fname varchar(20), LName varchar(20), Category integer);
create table typepeople (id integer, catName varchar(20));
commit;
insert into people values('John','Smith', 1);
insert into people values('Al','Jones', 2);
insert into people values('Jim','Brown', 4);
insert into Typepeople values(1, 'Employee');
insert into Typepeople values(2, 'Customer');
insert into Typepeople values(3, 'Supplier');
commit;
Then run the SQL Statement which makes the FULL JOIN As follows :
SELECT Fname, Lname, Catname
FROM people, typepeople
WHERE category (+)= id
UNION
SELECT Fname, Lname, Catname
FROM people, typepeople
WHERE ID (+)= category
ORDER BY 3