I’m trying to setup a NSPredicate to filter data.
I have a property of an entity called code that is in format like 55.534.
I’m trying to fetch all data in a range, for example 50-60.
I have this but it doesn’t work.
NSPredicate *myPredicate = [NSPredicate predicateWithFormat:@"ANY code BETWEEN %@", [NSArray arrayWithObjects:self.predicateFilterStart, self.predicateFilterEnd, nil]];
First of all, your SQL syntax is wrong. Your predicate format should be
Secondly, %@ formatter should receive NSString, while you’re passing NSArray.
Try this: