I have identified duplicate records in my staging environment
SQL> SELECT COUNT(*)
2 FROM MASTER_CHILD_MERGE A
3 WHERE A.CAM_ID IN (SELECT B.CAM_ID FROM CAM_DIM B);
SQL> 703022
For the analyst in our team, I want to create a table that has A and B’s columns. I tried doing that
SQL> CREATE TABLE DUPES AS
2 SELECT * FROM NDS_MASTER_CHILD_MERGE A
3 WHERE A.CAM_ID IN (SELECT B.CAM_ID FROM CAM_DIM B);
but I realized that it will only gives me A’s columns. How do I add B’s columns as well? I am pretty sure it is an obvious solution but I am not seeing it…
I am on Oracle 10g.
Just join those two tables