I want to query the sqllite table by specifying a range. So I like giving me all the records with an identity column between 3000 and 3010.
I tried what Apple recommends, but that didn't work. Here is what I tried and failed.
NSPredicate *betweenPredicate = [NSPredicate predicateWithFormat: @"attributeName BETWEEN %@", @[@1, @10]];
I have two lines starting and ending. I updated the Apple example as follows.
NSPredicate *betweenPredicate = [NSPredicate predicateWithFormat: @"%@ BETWEEN %@", columnName, @[start,end]];
When I execute a FetchRequest with the above predicate, I get 0 records, even if there are records in the table matching the predicate. Can someone point out where I am wrong?
source share