title: Oracle SQL - Joining with an "OR" condition
body: <p>This is my second post today, so I am sorry for flooding the forums.</p>
  
  <p>I am having trouble conceptually grasping how to accomplish what I need to do.</p>
  
  <p>I have one table with contains my PART_NUM, and a separate field called "LOWER_PART_NUM" which is a smaller component of the bigger part (imagine a chainsaw. The teeth are the LOWER_PART_NUM and the whole unit is the PART_NUM).</p>
  
  <p>I then have a table that has numbers, and names. It is two columns.</p>
  
  <p>I am looking to JOIN my table that has all of my part numbers with my name table, where the name table would fill in the blank values for both PART_NUM OR LOWER_PART_NUM depending on which matched. Here is an example:</p>
  
  <p><a href="https://i.stack.imgur.com/EXKLQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EXKLQ.jpg" alt="enter image description here"></a></p>
  
  <p>It would have to be a left join, because every part doesn't always have a lower part (we also don't go below one level, so no worries there).</p>
  
  <p>I can't figure out, however, how to set up the SQL query... because if I do</p>
  
  <pre><code>SELECT PART_NUM, LOWER_PART_NUM, PART_PRICE
  FROM PARTS
  LEFT JOIN PART_NAMES ON PARTS.PART_NUM = PART_NAMES.PART_NUM
  </code></pre>
  
  <p>Then I miss getting the names for the lower... but</p>
  
  <pre><code>SELECT PART_NUM, LOWER_PART_NUM, PART_NAME, PART_PRICE
  FROM PARTS
  LEFT JOIN PART_NAMES ON PARTS.LOWER_PART_NUM = PART_NAMES.PART_NUM
  </code></pre>
  
  <p>Could anybody help me logically figure this out? I would appreciate any advice.</p>
  
  <p>Thank you!</p>