title: How to select data from 30 days?
body: <p>I have query:</p>
  
  <pre><code>SELECT name
  FROM (
  SELECT name FROM 
  Hist_answer
  WHERE id_city='34324' AND datetime &gt;= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)
  UNION ALL
  SELECT name FROM 
  Hist_internet
  WHERE id_city='34324' AND datetime &gt;= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)
  ) x
  GROUP BY name ORDER BY name
  </code></pre>
  
  <p>But <strong>DATE_SUB</strong> is a MySQL function and I need function for MsSQL 2008</p>
  
  <p>Tell me please how to select data from 30 days by using MsSQL 2008?</p>
  
  <p>P.S.: Data type of  <strong>datetime</strong> is <code>smalldatetime</code></p>