I had a similar problem ... call me paranoid .. but I like that my sqlstring looks nice and easy to track, if something went wrong, I used stringWithFormat
Example:
NSString sqlString = [NSString stringWithFormat: @"%@ %@ %@ %@ %@",
@"SELECT name, address, phone",
@"FROM whateverDatabase",
@"LEFT JOIN ...",
@"WHERE ...",
@"AND ...."];
hope if this is what you are looking for (I realized that I posted on the wrong page ... maybe here is better)
source
share