title: copy value from one field to another with a unique identifer
body: <p>I'm at a lost once again :)
  I've searched and I couldn't find a distinct answer that worked for me, i would love to get some help regarding my question.</p>
  
  <p>I have a table that looks like this:</p>
  
  <pre><code>USERID      EVENT               CREATED_DATE
  223         USER_CREATED        2018-26-10 00:00:00
  223         USER_ACTIVATED      2019-01-01 00:00:00
  245         USER_CREATED        2018-21-10 00:00:00
  245         USER_ACTIVATED      2019-03-01 00:00:00
  261         USER_CREATED        2018-22-10 00:00:00
  261         USER_ACTIVATED      2019-09-01 00:00:00
  257         USER_CREATED        2018-27-10 00:00:00
  </code></pre>
  
  <p>what I want is to alter the dates of the USER_ACTIVATED events, <strong>I want them to match the relevant USER_CREATED event dates</strong>, the key is the USERID.</p>
  
  <p>for example, for USERID=223, the USER_CREATED date is '2018-26-10 00:00:00' so the USER_ACTIVATED date should be '2018-26-10 00:00:00' as well.</p>
  
  <p>I need an UPDATE query.</p>
  
  <p>a few points:</p>
  
  <ul>
  <li>there can be only 1 event of each type on each USERID, there are no duplications on the same USERID.</li>
  <li>I have a query that gets all the relevant USERIDs, it's not that relevant I think, but its generally to get al userIds &lt; 0, and the date of the user_created is &lt; SYSDATE-1</li>
  <li>in my example, the USERIDs are one after another, but in reality it's not set in stone that it will be 223, then 245, then 223 again with a different event.</li>
  </ul>
  
  <p>as a final note, the result of the UPDATE should be:</p>
  
  <pre><code>USERID      EVENT               CREATED_DATE
  223         USER_CREATED        2018-26-10 00:00:00
  223         USER_ACTIVATED      2018-26-10 00:00:00
  245         USER_CREATED        2018-21-10 00:00:00
  245         USER_ACTIVATED      2018-21-10 00:00:00
  261         USER_CREATED        2018-22-10 00:00:00
  261         USER_ACTIVATED      2018-22-10 00:00:00
  257         USER_CREATED        2018-27-10 00:00:00
  </code></pre>