title: SQL Server join IP address to IP range
body: <p>In SQL Server, what's the simplest way to join a table of IPv4 addresses...</p>
  
  <pre><code>IPAddress
  ------------
  10.70.80.34
  10.70.81.60
  10.70.81.205
  </code></pre>
  
  <p>To a table of IP ranges in CIDR notation...</p>
  
  <pre><code>IPRange          Description
  ---------------  -----------
  10.70.80.0/24    Sydney
  10.70.81.0/25    Melbourne
  10.70.81.128/25  Perth
  </code></pre>
  
  <p>There will be fewer than 100 rows in the IP range table.</p>