title: Inserting a substring value into an already existing entry
body: <p>Currently I have a database with the following parameters and entry:</p>
  <p><a href="https://i.stack.imgur.com/2vuSs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2vuSs.png" alt="enter image description here" /></a></p>
  <p>Now I want to fill the column status_from in this particular entry with the id 1 with a substring of the action column. Which is basically I want to fill my status_from column with a word that comes after from and before to of the action column. To achieve this I've tried using the following statement:</p>
  <pre><code>INSERT INTO crm_logs2(status_from) SELECT status_from WHERE id='1' VALUES (substring_index(substring_index(action, 'from', -1),'to', 1))
  </code></pre>
  <p>But doing this gave me the following error:</p>
  <p>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VALUES (substring_index(substring_index(action, 'from', -1), ...' at line 1</p>