You need to sign in to do that
Don't have an account?
Darla.ax69
Querying accounts not modified since creation
Hello,
I'm trying to count how many accounts haven't been modified since they were created. My plan was to run a query with a batch size of 1 and look at the response XML to see how many results are found. (I only need the number of accounts, not the account details).
I tried to run this query:
select Id from Account where CreatedDate = LastModifiedDate
And I get a malformed query exception. (I kind of expected that, but was hoping...)
Is there any way to accomplish this without retrieving the created date and modified date for all accounts and comparing it myself?
Thanks,
=> Darla
I'm trying to count how many accounts haven't been modified since they were created. My plan was to run a query with a batch size of 1 and look at the response XML to see how many results are found. (I only need the number of accounts, not the account details).
I tried to run this query:
select Id from Account where CreatedDate = LastModifiedDate
And I get a malformed query exception. (I kind of expected that, but was hoping...)
Is there any way to accomplish this without retrieving the created date and modified date for all accounts and comparing it myself?
Thanks,
=> Darla
Hi Darla,
I can't think of a way to do this as you must put a constant on the right side of the logical operator.
Unfortunately, this seems like an edge case. In other words, what would be other situations where you would want to compare to values on the record in a query?