I am trying to compute a query from a string variable such as
public String query = 'SELECT Id,ownerid,closedate,name FROM Opportunity WHERE isClosed =false and closedate =: dtreshold and (stagename != "Pending Payment" OR stagename != "Complete" OR stagename != "Rejected" OR stagename != "Cancelled" )';
But upon executing it it gives me the following error:
10:50:26:019 EXCEPTION_THROWN [17]|System.QueryException: line 1:124 no viable alternative at character '"'