尝试执行以下操作时出现此错误。我从直接绑定到控制器的 Visualpage 中获取我的截止日期。
QueryException: line 1:322 no viable alternative at character ' '
我的查询正在执行:
Select c.CaseNumber,c.Status,c.ID, Account.Name, Account.Status__c, Account.Type,Account.Location_Type__c,Account.BillingCountry,Contact.Name, Contact.Email FROM Case c where c.BatchNumber__c = 'a0dR0000003dfBbIAI' and c.Deadline_Date__c = 2012-11-16 00:00:00
我的代码:
Date deadline = CaseParameter.Deadline_Date__c;
soql = 'Select c.CaseNumber,c.Status,c.ID, Account.Name, Account.Status__c, Account.Type,Account.Location_Type__c,Account.BillingCountry,Contact.Name, Contact.Email FROM Case c where c.BatchNumber__c = \''+batchNumber+'\'';
soql+= ' and c.Deadline_Date__c = '+deadline;