title: How to specify range with NSPredicate in Objective C
body: <p>I want to query sqllite table by specifying a range. So it's like give me all records whose id column between 3000 and 3010.</p>
  
  <p>I tried what Apple recommends, but it didn't work. Here is what I tried and failed.</p>
  
  <pre><code>NSPredicate *betweenPredicate =
  [NSPredicate predicateWithFormat: @"attributeName BETWEEN %@", @[@1, @10]];
  </code></pre>
  
  <p>I have 2 strings called start and end. I updated Apple's example as following.</p>
  
  <pre><code>NSPredicate *betweenPredicate =
  [NSPredicate predicateWithFormat: @"%@ BETWEEN %@", columnName, @[start,end]];
  </code></pre>
  
  <p>When I executeFetchRequest with the above predicate I get 0 records even though the table has records matching the predicate. Can someone point where I go wrong? </p>