At present I have some hardcoded SQL to do this:update invoices set credit_contname = 'John Smith' WHERE costcent = 'ZDTI' and cust_name like '[A-K]%' and cust_id not in ( select cust_id FROM Customers where accountcode IN (SELECT CustAccountCode FROM AllocationOverride) GROUP BY cust_id )
What I want to do is use a table dynamically.So I have stored the search string in a table [A-K]How do I use this in the search above?update invoices set credit_contname = 'John Smith' WHERE costcent = 'ZDTI' and cust_name like (SELECT SearchString FROM Table) and cust_id not in ( select cust_id FROM Customers where accountcode IN (SELECT CustAccountCode FROM AllocationOverride) GROUP BY cust_id )