I am trying to fetch record in my trigger using SOQL using LIKE. The value I need to compare is a combination of three fields. I am trying the below code. Not sure what I am doing wrong
string DocName = ''+q.SBQQ__Account__c+' - '+q.SBQQ__Account__c+' - '+q.Name+'%';
Document d = [Select id from Document where Name LIKE ''+DocName+'' order by CreatedDate asc LIMIT 1];