10
I need to build an NSPredicate with many pieces of data. For example in SQL I would do something like the following:
SELECT *
FROM TRANSACTIONS
WHERE CATEGORY IN (categoryList)
AND LOCATION IN (locationList)
AND TYPE IN (typeList)
AND NOTE contains[cd] "some text"
AND DATE >= fromDate
AND DATE <+ toDate
I'm struggling with how to build this as an NSPredicate for use with Core Data. I've read the documentation... which only provides simplistic examples. If anybody can point me to a more complex example I would certainly appreciate it.
Well, I had an answer out here for two years that many people found helpful. My post was deleted. Here is the updated URL with the solution.
https://www.radeeccles.com/convert-sql-statement-to-an-nspredicate-for-use-with-core-data/