June 5, 2016 at 7:53 pm
Can someone please help on a Oracle PL/SQL code which will compare each column in 2 similar structured (similar data as well and one tend to change wherein I need to capture that change) oracle tables and to result in only row numbers, column name (which got updated), old value, new value. Like below.
RNUM CNAME OLD_VAL NEW_VAL
------------ -------------------- ------------------------------ -----------------------------
1 ENAME Name11 Name1
1 HIREDATE 13-may-2011 13-may-2001
3 ENAME Name32 Name3
3 HIREDATE 13-jul-2011 13-jul-2001
4 DESIGNATION SENIOR ANALYST ANALYST
5 SALARY 10000 5000
I do not want to hard code any column names in the code, it should be like a generic script i.e. if I input 2 table names then it should fetch its column names from metadata and then should perform the comparison. Thanks in advance.
June 6, 2016 at 5:41 am
kokilaeb (6/5/2016)
Can someone please help on a Oracle PL/SQL code which will compare each column in 2 similar structured (similar data as well and one tend to change wherein I need to capture that change) oracle tables and to result in only row numbers, column name (which got updated), old value, new value. Like below.RNUM CNAME OLD_VAL NEW_VAL
------------ -------------------- ------------------------------ -----------------------------
1 ENAME Name11 Name1
1 HIREDATE 13-may-2011 13-may-2001
3 ENAME Name32 Name3
3 HIREDATE 13-jul-2011 13-jul-2001
4 DESIGNATION SENIOR ANALYST ANALYST
5 SALARY 10000 5000
I do not want to hard code any column names in the code, it should be like a generic script i.e. if I input 2 table names then it should fetch its column names from metadata and then should perform the comparison. Thanks in advance.
Have you considered posting your question in an Oracle forum, rather than SQL Server? You might get a better response:cool:
June 8, 2016 at 9:33 am
There is no forum for oracle discussion.
June 8, 2016 at 10:36 am
kokilaeb (6/8/2016)
There is no forum for oracle discussion.
Really? So what is this?
https://community.oracle.com/community/database/developer-tools/sql_and_pl_sql
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy