title: Is there an elegant way to Invert a Bit value in an SQL insert Statement?
body: <p>I'm converting some data in SQL Server:</p>
  
  <pre><code>INSERT INTO MYTABLE (AllowEdit)
  (Select PreventEdit from SOURCETABLE)
  </code></pre>
  
  <p>so I need to inverse the bit value from source table. I expected <code>NOT</code> to work, as this is how I would do it in code, but it doesn't. The most elegant way I can think of is:</p>
  
  <pre><code>INSERT INTO MYTABLE (AllowEdit)
  (Select ABS(PreventEdit -1) from SOURCETABLE)
  </code></pre>
  
  <p>Is there a more standard way to do it?</p>