Reputation: 1224
I'd like to make a complex query, I don't care about it being fetchXML or queryexpression, as long as it works :-)
I want to create either a query with a NOT IN(select from) structure, or its equivalent LEFT OUTER JOIN using a WHERE IS NULL.
The query is something like this:
SELECT t1.*
FROM table1 t1
LEFT OUTER JOIN table2 t2 ON t1.xid = t2.id
WHERE t2.id IS NULL
(query structure with an example: http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/)
As you can see, the tricky bit is "t2.id" in the where-clause. I have found no way to filter on this value using any tools or docs. Is it even possible?
Upvotes: 0
Views: 490
Reputation: 6629
This is one of the things that are not possible with CRM queries. There are (not necessarily workable) alternatives:
Upvotes: 1