title: Find Zipcode in range of Zipcodes
body: <p>Consider the following:</p>
  
  <pre><code>CountryCode ZipCodeFrom ZipCodeTo Truck
  -------------------------------------------
      UK      AA1234      AG4321    Truck 1
      UK      AG4322      AL9999    Truck 2
      UK      AM0000      AZ9999    Truck 3
      UK      BA0000      ZZ9999    Truck 4
      SE      0000        3333      Truck 10
      SE      3334        9000      Truck 11
      SE      9001        9999      Truck 12
  </code></pre>
  
  <p>Each line represents a area that one delivery truck is resposible for.</p>
  
  <p>Say one Order was to be shipped to the postal code AB4000, Truck 1 should be used. Postal Code 5000 would be truck 11</p>
  
  <p>Some countries use a mix of letters and numbers in their postal codes, some only use numbers.</p>
  
  <p>Is there an easy way to find the corrosponding delivery truck (postal code range) given a postal code.</p>
  
  <p>I have tried using between, but it doesnt seem to work for me. Maybe i need to create some rules for each country zipcode?</p>
  
  <p>Can be solved in SQL or C#</p>
  
  <h3>Update:</h3>
  
  <pre><code>select * from PostalCode where CountryCode = 'DK' and 'AB4000' between ZipCodeFrom and ZipCodeTo
  
  select * from PostalCode where CountryCode = 'DK' and 'AB4000' &lt;= ZipCodeTo and 'AB4000' &gt;= ZipCodeFrom
  </code></pre>
  
  <p>This is what i have tried</p>
  
  <p>I will try the suggestion Wietze314 came up with.</p>