views:

42

answers:

1

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.

A: 

I found out how to do this myself. I created a blog post about it here: http://appworks.radeeccles.com/programming/convert-sql-nspredicate-core-data/

radesix