How to frame the below dynamic query. Opportunity_User__c field has value in format of "email@example.com". Now i want to retrieve all the opportunities having that value using dynamic query.
List<Opportunity> opplist = new List<Opportunity>(); String Query='SELECT id FROM opportunity Where Opportunity_User__c=\'firstname.lastname@example.org\''; opplist = database.query(Query);
I am getting the below error : "System.QueryException: unexpected token: '@'"