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!

Compare multiple columns on multiple rows in 2 tables

gparapidDec 12 2016 — edited Dec 12 2016

Hi,

I would kindly ask for help on this matter. Let me explain, we have 2 tables:

USER_TABLE

USERPOSITIONPRODUCT
USER1155
USER2256
USER2155
USER1256
USER1357
USER21057

And DEFAULT_USER table

PRODUCTPOSITION
551
562
573

I need to extract only USER from USER_TABLE where match is on USER_TABLE.POSITION = DEFAULT_USER.POSITION and USER_TABLE.PRODUCT = DEFAULT_USER.PRODUCT, meaning from the example above, result would be only USER1 as USER2 fails for product 57.

Thanks !

This post has been answered by Saubhik on Dec 12 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2017
Added on Dec 12 2016
4 comments
971 views