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!

Joining disjoint tables and eliminating repetition

userKarenJun 18 2010 — edited Jun 22 2010
Using customers as an example of my question -- I have 3 tables. Customer with cust_iid, orders with cust_id and preferences with cust_id. I want to see customer id in column 1, customer orders for that customer in column2 and customer preferences for that customer in column 3. Orders and preferences for each customer are not related to each other-only to the customer. When joining on customer id, if Customer John has 2 orders and 1 preference, the preference is repeated for each order. How can I make column 2 and 3 independent of each other so column 2 has each each order once for the customer and column 3 has each preference for the customer listed once? I feel like this should be straightforward to do but cannot find any reference to it. Pointing me where to look would be most appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2010
Added on Jun 18 2010
5 comments
1,678 views