Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Match column data

854561Apr 12 2011 — edited Apr 14 2011
I have two tables in the same database (Oracle 10g) say temp1 and Temp2 having same column names. Its as follows
Temp1
Access_ID Name Destination OrderNumber
A101 A D101 O101
A101 B D101 O102
B101 A D101 O103
B102 C D102 O104

Temp2
Access_ID Name Destination OrderNumber
A101 A D101 O101
A101 C D101 O102
B101 A D102 O103
B102 C D102 O104

Now I want to create a new table which gives the answer as such
Temp3
Access_ID Name Destination OrderNumber
A101 N Y Y
B101 Y N Y
B102 Y Y Y

Basically What it does is for each distinct(Access Id's) it compares the corresponding columns in the two tables & if there is a mismatch then it should display as N else it should display as Y.
This post has been answered by Frank Kulash on Apr 12 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 12 2011
Added on Apr 12 2011
3 comments
145 views