You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Compare too rows and insert the changes into new record in Oracle10g

2 replies [Last post]
Guest's picture
Guest

Hi All, Please help me in writing a query to compare two rows of a table and insert the changes(i.e., changed columns) into another table.

Lepa's picture
User offline. Last seen 2 years 1 week ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Compare too rows and insert the changes into new record ...

This is not as easy to do as it sounds. You need to have knowledge of PL/SQL. Here is a post that has some code to help you get that done.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Lepa's picture
User offline. Last seen 2 years 1 week ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Compare too rows and insert the changes into new record ...

Also, check out the below blog post that I've made few months back. It is to compare the same fields on the same table but in a different environment. It is simple enough and you should be able to change it a little to work for you.
http://www.compshack.com/sql/compare-data-from-same-table-two-different-environments

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog