title: SQL: Where MYID = ANY?
body: <p>In a SQL query, that contains</p>
  
  <pre><code>... WHERE MYID = @1 ....
  </code></pre>
  
  <p>I have to manage 2 cases<br>
  1) There is a filter on a column, @1 will be a number (1,2,X...)</p>
  
  <p>2) There is no filter on that column, @1 will be ...? (<em>ANY</em>)</p>
  
  <p>Is there something for this "any" (SQL Server 2005) ?</p>
  
  <p><strong>PS.</strong><br>
  Obviously, I understand that I can remove the "where". </p>
  
  <p><strong>PPS.</strong><br>
  I explain myself for better understanding: I have this query in the code, and would like to pass an integer as parameter when the filter is ON, and "something" when my filter is OFF.</p>
  
  <pre><code>if (filterOn)
      GetFoos(fooID);
  else
      GetFoos("ANY");
  
  GetFoos(param1): "select * from FOOS where FOOID = {0}", param1
  </code></pre>