title: Oracle query to find all occurrences of a charcter in a string
body: <p>I have to write an Oracle query in toad to find all the occurrences of a character in a string. For example if I'm searching for <code>R</code> in the string <code>SSSRNNSRSSR</code>, it should return positions 4, 8 and 11.</p>
  
  <p>I am new to Oracle and tried this.</p>
  
  <pre><code>select instr(mtr_ctrl_flags, 'R', pos + 1, 1) as pos1 
    from mer_trans_reject  
   where pos in ( select instr(mtr_ctrl_flags, 'R', 1, 1) as pos 
                    from mer_trans_reject
                         );
  </code></pre>
  
  <p>where <code>mtr_ctrl_flags</code> is the column name. I'm getting an error indicating that <code>pos</code> is an invalid identifier.</p>