如何过滤 LinkEntity 外部链接实体的属性?
我想做一个复杂的查询,我不关心它是 fetchXML 还是 queryexpression,只要它能工作就行:-)
我想创建一个带有 NOT IN(select from) 结构的查询,或其等效结构使用 WHERE IS NULL 的 LEFT OUTER JOIN。
查询是这样的:(
SELECT t1.*
FROM table1 t1
LEFT OUTER JOIN table2 t2 ON t1.xid = t2.id
WHERE t2.id IS NULL
带有示例的查询结构:http://blog.sqlauthority.com/2008/04/22/sql-server-better-performance-left-join-or-not-in/)
作为您可以看到,棘手的部分是 where 子句中的“t2.id”。我发现无法使用任何工具或文档来过滤此值。有可能吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 CRM 查询无法做到的事情之一。有(不一定可行)替代方案:
This is one of the things that are not possible with CRM queries. There are (not necessarily workable) alternatives: