-
Compare tables and insert the differnce into table
I have two tables say A in database X and A in database Y..I want to insert the records from table A in database Y into table A in X database.
i tried the minus option it gives unique constraint violated error...If i try append option in impdp still it gives same error..can any one help?
-
That means your MINUS statement is not returning right result set. Are you using DBLINK to use MINUS query?.
-
-
Try using the merge command. you tell it how to handle conflicts. If a record does not exist there is an insert clause, if a record does exist there is an update clause, etc.
-
Originally Posted by mohith2009
I have two tables say A in database X and A in database Y..I want to insert the records from table A in database Y into table A in X database.
i tried the minus option it gives unique constraint violated error...If i try append option in impdp still it gives same error..can any one help?
Chances are that table Y.A is a child table - is there a Referential Integrity constraint pointing to a parent table in Y database? e.g. FK?
If this is the case you have to insert the parent rows first.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|