title: Split String by delimiter position using oracle SQL
body: <p>I have a string and I would like to split that string by delimiter at a certain position.</p>
  
  <p>For example, my String is <code>F/P/O</code> and the result I am looking for is:</p>
  
  <p><img src="https://i.stack.imgur.com/l6e17.png" alt="Screenshot of desired result"></p>
  
  <p>Therefore, I would like to separate the string by the furthest delimiter.<br>
  <em>Note: some of my strings are <code>F/O</code> also for which my SQL below works fine and returns desired result.</em></p>
  
  <p>The SQL I wrote is as follows:</p>
  
  <pre><code>SELECT Substr('F/P/O', 1, Instr('F/P/O', '/') - 1) part1, 
         Substr('F/P/O', Instr('F/P/O', '/') + 1)    part2 
  FROM   dual
  </code></pre>
  
  <p>and the result is:</p>
  
  <p><img src="https://i.stack.imgur.com/jM8wE.png" alt="Screenshot of unexpected result"></p>
  
  <p>Why is this happening and how can I fix it?</p>