About this question
for an extension controller of a VF page, I need to build a query to retrieve all the leads with a Company name similar to a variable. My variable name is compagnia: Now I'm trying to build the query like this:
String query='select Id,Company from Lead where Company like'+ '%'+compagnia'%'
List
But the query doesn't work. How Can I solve this problem?