You need to sign in to do that
Don't have an account?
KC0798
Apex Explorer and SQL Syntax
Hi,
Anyone can tell me which DB salesforce is using? I'm trying to run some queries using the APex Explorer, but don't now how to work comparisons for date fields.
Eg. Like to do comparison on dates fields against today's date.
Select o.AccountId, o.Claim_Date__c, o.Id, o.Installation_Completed_Date__c, o.Installation_Start_Date__c, o.Name, o.OwnerId, o.Progress_Claim_Interval__c from Opportunity o where (o.Claim_Date__c <> null and o.Installation_Completed_Date__c = null and o.Installation_Start_Date__c <> null and o.Claim_Date__c < TODAY()??)
Thanks,
KC
Hi KC,
SF.com DB is ORACLE. but directly u cant run querys.
my suggestion is download "sforce Explorer" . it will help to solve ur issue.
:smileyhappy:
Salesforce uses SOQL, not SQL. You can't expect quite the same functionality. In your case though, you can do this query:
TODAY happens to be a date literal that you can use when querying dates. You should check out the documentation (http://wiki.apexdevnet.com/Web_Services_API) for more information on this syntax as well (and the SForce Explorer, of course!).
Hi KC,
i think the below query will help u
Select o.AccountId, o.Claim_Date__c, o.Id, o.Installation_Completed_Date__c, o.Installation_Start_Date__c, o.Name, o.OwnerId, o.Progress_Claim_Interval__c from Opportunity o where (o.Claim_Date__c <> null and o.Installation_Completed_Date__c = null ) and ( o.Installation_Start_Date__c <> null and o.Claim_Date__c < TODAY)
if it wasn't work,Can u give me the credentials for testing ur query.
:smileyhappy: