1

嗨,下面是我的 SOQL qoery

SELECT ID,Name, Dodge_Report_Number__c,Project_Name__c,Bid_Date__c,GC_Awarded__c,Action_Stage__c,Target_Start_Date__c,Project_Valuation_High__c,Project_Valuation_Low__c,Type_Of_Work__c,Removed_By__r.Name, Removed_By__r.LastName ,Removed_By__r.FirstName,Reason_Removed_Comments__c,Reason_Why_Project_Removed__c,Branch_ID__c FROM Dodge_Project__c WHERE Branch_ID__c != null AND CreatedDate >= LAST_QUARTER AND CreatedDate <= THIS_QUARTER AND Job_Profile_Status__c NOT IN('Created','Removed') AND Branch_ID__c IN('101','102','909','903','941','994','217','904') AND (Action_Stage__c IN ('Start','Construction') OR GC_Awarded__c = TRUE) and (Name like 'P@#$&(%' or Dodge_Report_Number__c like 'P@#$&(%' or Project_Name__c like 'P@#$&(%' or Action_Stage__c like 'P@#$&(%' or Type_Of_Work__c like 'P@#$&(%' or Removed_By__r.Name like 'P@#$&(%' or Reason_Why_Project_Removed__c like 'P@#$&(%' or Branch_ID__c like 'P@#$&(%') order by Name asc NULLS FIRST

我收到一个错误,例如“在与“like”运算符一起使用的过滤器值“P@#$&(%”中发现无效字符”。

如果我像这样写查询

SELECT ID,Name, 

Dodge_Report_Number__c,Project_Name__c,Bid_Date__c,GC_Awarded__c,Action_Stage__c,Target_Start_Date__c,Project_Valuation_High__c,Pro

ject_Valuation_Low__c,Type_Of_Work__c,Removed_By__r.Name, Removed_By__r.LastName 

,Removed_By__r.FirstName,Reason_Removed_Comments__c,Reason_Why_Project_Removed__c,Branch_ID__c FROM Dodge_Project__c WHERE 

Branch_ID__c != null AND CreatedDate >= LAST_QUARTER AND CreatedDate <= THIS_QUARTER AND Job_Profile_Status__c NOT IN

('Created','Removed') AND Branch_ID__c IN('101','102','909','903','941','994','217','904') AND (Action_Stage__c IN 

('Start','Construction') OR GC_Awarded__c = TRUE) and ( Project_Name__c like 'P@#$&(%' ) order by Name asc NULLS FIRST

它工作正常。

问题是什么?谢谢。

4

0 回答 0