title: sql logical A and (B or C)
body: <p>I would like to write sql code(using PROC SQL in SAS)  using the logical</p>
  
  <p>A and (B or C) </p>
  
  <p>Where A is of the form (A1 AND A_2 AND A_3 ... A_n) so in other words it long</p>
  
  <p>since the AND operator evaluates first, in sql code, I cant write it as</p>
  
  <pre><code>A AND (B or C)
  </code></pre>
  
  <p>because the parentheses does have any effect I would get <code>A AND B OR C</code></p>
  
  <p>My question is do I have to write it as:</p>
  
  <pre><code>(A and B) or (A and C)  
  </code></pre>
  
  <p>this would require  to write a long (logical) expression <code>A</code> two times. </p>