You need to sign in to do that
Don't have an account?
Sabrent
No viable alternative at character '%'
No matter where I put the excape character, i keep getting the error - No viable alternative at character '%'
soql +=' and Account__r.Name LIKE \' ''%\'+String.escapeSingleQuotes(accountName)+'%\'';
Can someone please point out where am i missing a qoute?
Thank you.
You seem to have extra quotes
All Answers
You seem to have extra quotes
String accountName='abc';
List<Account> a=Database.query('Select id,Name From account where name like \'%'+String.escapeSingleQuotes(accountName)+'%\'');