Thursday, 7 March 2013

How to put queries in CORE DATA to fetch specific attribute values


// Condition to check for form id and instance

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"formId == %i && instanceNo == %d && questionId == %i", [form.formId intValue],instancevalue,[qq.formQuestionId intValue]];

[request setPredicate:predicate];

// WE use predicate for sql queries to fetch specific data