title: SQL LIKE % FOR INTEGERS
body: <p>In T-SQL, how do I write the query to select rows for any integer value for a column??</p>
  
  <p>For example, the data is like this</p>
  
  <pre><code>NAME,AGE
  A,10
  B,20
  C,10
  D,20
  </code></pre>
  
  <p>and There's a <code>&lt;asp:dropdownlist&gt;</code> that has two options, <code>10,20</code>, so that a user can select either <code>10</code> or <code>20</code>. If the user selects <code>10</code> or <code>20</code>, The data is being pulled correctly, but how do I say a <code>*</code> condition?? - like select ALL data for ANY value in the <code>age</code> column??</p>
  
  <p>My code is as follows,</p>
  
  <p><code>select ...where (AGE = @AGE)</code></p>
  
  <p><code>&lt;SelectParameters&gt;
  &lt;asp:ControlParameter ControlID="DropDownList1" Name="AGE" PropertyName="SelectedValue"
          DbType="Int32" DefaultValue="ANY"</code></p>
  
  <p>Also, the follow query works perfectly in the SSMS, but how to implement this behavior in asp.net SqlDataSource??</p>
  
  <p><code>SELECT * FROM [TABLE] where AGE is not null</code></p>
  
  <p>If the column AGE was of varchar type, I am able to use the '%', but it's an numeric field</p>
  
  <p>Thanks,</p>