function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amargariamargari 

Soql-R Question

I have been playing with the appexchange.schema query tool in eclipse today.  I managed to do a Soql-R query for bring back contacts and accounts.
 
I was wondering if there wa a way to filter on the subset.  I.E.  Return all Accounts with contatcs something like this:
 
Select a.Id, (Select AccountId From Contacts where LastModifiedDate>=2006-05-10T16:30:00.001-08:00) From Account a where Contacts  != null or a.LastModifiedDate>=2006-05-10T16:30:00.001-08:00
 
This query should return all accounts that have been modified since 2006-05-10T16:30:00.001-08:00 or accounts where the contact has been modified since 2006-05-10T16:30:00.001-08:00
 
-Thanks
pedzpedz
I assume the eclipse is built on the basic SOAP interface. The SOAP interface can not do joins, sub-selects, and a number of other things. From the API book:

SOQL does not support all advanced features of the SQL SELECT command. For example, you
cannot use SOQL to perform join operations, use wildcards in field lists, use calculation
expressions, or specify an ORDER BY clause to sort rows in the result set.
amargariamargari
This is with the winter pre-release which allows joins.
benjasikbenjasik
you can't do this: "Contacts  != null", but you can simulate this in your code by checking the size.  If you could filter on contacts.size() > 0.  Would that get you what you need?
pedzpedz


benjasik wrote:
you can't do this: "Contacts  != null"



Can you do "foo is not null" ?

Just curious.