Too obvious to be what you are looking for Horace, but it seems to match your requirements in the last post...
Code:11:23:40 SQL> select * from temp_table1; CUST_NUM FAVOURITE_ FAVOURITE_ ---------- ---------- ---------- 1 red porsche 2 blue ferrari 4 orange Skoda 6 purple mini 11:23:47 SQL> select * from temp_table2; CUST_NUM FAVOURITE_ FAVOURITE_ ---------- ---------- ---------- 1 red porsche 3 blue ferrari 5 orange Beetle 6 red mini 11:23:52 SQL> select a.*, b.* 11:23:59 2 from temp_table1 a, 11:23:59 3 temp_table2 b 11:23:59 4 where a.cust_num = b.cust_num 11:23:59 5 and (a.favourite_colour<>b.favourite_colour 11:23:59 6 or a.favourite_car<>b.favourite_car); CUST_NUM FAVOURITE_ FAVOURITE_ CUST_NUM FAVOURITE_ FAVOURITE_ ---------- ---------- ---------- ---------- ---------- ---------- 6 purple mini 6 red mini 11:24:00 SQL> spool off




Reply With Quote