title: Update Column With Another Column From Same Table
body: <p>I have a table named items_list:</p>
  
  <pre><code>
  id  item_name   required_number group_id    alcoholic   alt_item    dislciamer  alt_disclaimer
  ---------------------------------------------------------------------------------------------
  1   Draft Beer         1          24          true      Appetizer   Local Brand    null
  2   Burger             3          24          false     null          null         null
  3   Margarita          10         24          true     Street Corn    null        Only one
  4   Alcohol            1          10          true      Burger         null         null
  5   Frito Lay           3         10         false      null           null         null
  </code></pre>
  
  <p>And I want to update the <code>item_name</code> with the <code>alt_item</code> IF the <code>alcoholic</code> is TRUE AND it's not NULL.</p>
  
  <p>I tried this query</p>
  
  <pre><code>UPDATE items_list rl
  SET item_name = rl2.alt_item AND disclaimer = rl2.alt_disclaimer
  FROM items_list rl2
  WHERE rl.required_number = rl2.required_number AND rl.group_id = 24 AND rl.alt_item IS NOT NULL AND rl.alcoholic = TRUE;
  </code></pre>
  
  <p>But I get: <code>Query Error: error: argument of AND must be type boolean, not type character varying</code></p>
  
  <p>The only boolean I have is the alcoholic option but I don't know why is throwing that error, do I need to change something on my query?</p>
  
  <p>Here's a DB Fiddle for example: <a href="https://www.db-fiddle.com/f/7BvUh2FzkDhZhjqFfy1niT/4" rel="nofollow noreferrer">https://www.db-fiddle.com/f/7BvUh2FzkDhZhjqFfy1niT/4</a></p>