Re: OUTER JOIN question
Posted in 1998
Reiner Kunz wrote: > > Hi, > > I have two tables of the same structure. I want to select all records from > the second table which do not appear in the first table. How Do I do this > with an OUTER JOIN? Or is there another way? > > Then I want to write the found records in a third table for further > analysis. Many thanks for your help! Select the columns that you need from the first table and at least one column from the second table into a temp table with the INTO TEMP <tablename> clause. Then insert into the third table records selected from the TEMP table with a WHERE <column selected from second table> IS NULL. You cannot do this in a single step and MUST use the temp table which is OK since you can select from the temp table both for display/report and to use to insert into the third table. Art S. Kagel