title: Split and compare two Strings in Oracle SQL
body: <p>I have a table with three columns structured as followed:</p>
  
  <pre><code>+------------------------+------------------------------+--------------+
  | left                   | right                        | pattern      |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Kiki Cola 50 ml bottle       |              |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | 50 ml Kiki Cola bottle       |              |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Kiki Cola 50 ml              |              |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Kiki Cola Light bottle 50 ml |              |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Coca Cola 50 ml bottle       |              |
  +------------------------+------------------------------+--------------+
  </code></pre>
  
  <p>Now I would like to perform an Oracle-SQL-query which gives me the edit-pattern of the two strings left and right. The result should be as followed:</p>
  
  <pre><code>+------------------------+------------------------------+--------------+
  | left                   | right                        | pattern      |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Kiki Cola 50 ml bottle       | SAME         |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | 50 ml Kiki Cola bottle       | SWAPPED      |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Kiki Cola 50 ml              | CONTAINED_IN |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Kiki Cola Light bottle 50 ml | CONTAINS     |
  +------------------------+------------------------------+--------------+
  | Kiki Cola 50 ml bottle | Coca Cola 50 ml bottle       | NOT_SAME     |
  +------------------------+------------------------------+--------------+ 
  </code></pre>
  
  <p>Al my tries with REGEX_SPLIT and CONNECT BY were not successful. Do you have any ideas how to solve that problem?</p>