I use the SELECT query to download contacts from Salesforce.com. As it is given below and i am getting "MALFORMED_QUERY" exception
I use this select query and i am not getting what's the wrong with this.
Select Id,Contact.FirstName,Contact.LastName,Contact.Title,Contact.Department,Contact.Birthdate, Contact.Phone,Contact.HomePhone,Contact.MobilePhone,Con开发者_StackOverflowtact.OtherPhone,Contact.Fax,Contact.Email,Contact.MailingStreet, Contact.MailingCity,Contact.MailingState,Contact.MailingCountry,Contact.MailingPostalCode,Contact.OtherStreet, Contact.OtherCity,Contact.OtherState,Contact.OtherCountry,Contact.OtherPostalCode,Contact.Description,Contact.Account.Name From Contact where strcmp('%@',Id) = -1",lastcontactId
You need to generate a query that uses =, e.g.
select name from contact where id='005123123123123123'
so, you can use this to generate the query.
NSString *query = [NSString stringWithFormat:@"select name,etc from contact where id='%@'", lastContactId];
Here's the SOQL docs which has more examples.
And if you're trying to do paging, you should just run the entire query and use query/queryMore to page through the results.
精彩评论