This article: Is there a way to do Like against a list of Values?, has a nifty workaround for lack of a LEFT(Column, n) function. I am able to execute a successful code snippet in the anonymous window with the following:
String[] filters = new String[]{'AB1234%','AB2345%','AB3456%'};
List<Tools__c> tools = [SELECT ID, Serial_Number__c, Name,Account__r.Name,Product_Family__c FROM
Tools__c WHERE Serial_Number__c LIKE :filters];
System.Debug(tools);
Alternatively I can also swap out the System.Debug(tools); line for:
return tools;
In either case, the debug log has a VARIABLE_ASSIGNMENT event that indicates "List of size 40 too large to display". How can I execute the query and get the entire record set for a report?