+ Start a Discussion

Batch Apex Help

String query = 'select Id,Name,OwnerId,Key__c from ContractLineItem where Key__c LIKE ERROR%';
 I had use the above mentioned query in batch which throws an error says as viable error how can i use LIKE in this case i need the contractLineitem keys which contains error in key.
Any help is greatly appreciated
Naidu PothiniNaidu Pothini
String query = 'select Id,Name,OwnerId,Key__c from ContractLineItem where Key__c LIKE \'ERROR%\'';

 can you check if it is throwing any error if you change the query to above.