• duc.lam
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I have two different relationship queries, one is parent-child and the other child-parent:
 
SELECT a.Id, cc.LastName FROM Case a, a.Contact cc
SELECT Id, (SELECT Field, NewValue FROM Histories) FROM Case
 
How do I combine it into one query?
 
Hi,
 
I was using API 6.0 and am trying to upgrade to the current API 9.0.  With 6.0, I was able to filter on date and non-date fields as follows:
 
SELECT CaseNumber FROM Case WHERE isClosed = FALSE AND CreatedDate >= 2006-01-01
 
It seems that with API 9.0, this is no longer the case.   Specifically, the SOQL SELECT documentation states:
 
"A fieldExpression uses different date formats for date or dateTime fields. If you specify a dateTime format in a query, you can filter on dateTime fields only. Similarly, if you specify a date format value, you can filter on date fields only:"
 
I did try to submit the above query, but received an InvalidSObjectFault.
 
Does anyone know how I can rewrite the above to accomplish the same thing as before?
 
Hi,
 
I was using API 6.0 and am trying to upgrade to the current API 9.0.  With 6.0, I was able to filter on date and non-date fields as follows:
 
SELECT CaseNumber FROM Case WHERE isClosed = FALSE AND CreatedDate >= 2006-01-01
 
It seems that with API 9.0, this is no longer the case.   Specifically, the SOQL SELECT documentation states:
 
"A fieldExpression uses different date formats for date or dateTime fields. If you specify a dateTime format in a query, you can filter on dateTime fields only. Similarly, if you specify a date format value, you can filter on date fields only:"
 
I did try to submit the above query, but received an InvalidSObjectFault.
 
Does anyone know how I can rewrite the above to accomplish the same thing as before?