title: Update table with if statement PL/SQL
body: <p>I am trying to do something like this but am having trouble putting it into oracle coding.</p>
  
  <pre><code>BEGIN
  IF ((SELECT complete_date FROM task_table WHERE task_id = 1) IS NULL)
  THEN
   UPDATE task_table SET complete_date = //somedate WHERE task_id = 1;
  ELSE
   UPDATE task_table SET complete_date = NULL;
  END IF;
  END;
  </code></pre>
  
  <p>But this does not work.  I also tried</p>
  
  <pre><code>IF EXISTS(SELECT complete_date FROM task_table WHERE task_id = 1)
  </code></pre>
  
  <p>with no luck.</p>