title: Different conditions in WHERE clause
body: <p>Is there a way to write this simplier?</p>
  
  <pre><code>WHERE
      (
          (@IdAgent IS NULL AND IdAgent IS NULL)
          OR
          (@IdAgent IS NOT NULL AND IdAgent = @IdAgent)
      )
  </code></pre>