-3
Select OpportunityId
from opportunity AS c
left JOIN (
select a.opportunitynameid
from opportunity o
JOIN ApprovalDocument a ON a.opportunitynameid=o.OpportunityId
) AS b ON c.OpportunityId=b.opportunitynameid
Where b.opportunitynameid IS NULL and statecode=0
什么粘贴的一部分到存储过程中被困扰你吗? – TZHX
我想象一下可以在Google上轻松找到CREATE PROCEDURE命令的语法和示例。你具体在哪里卡住?你有什么尝试不起作用? – David
[将我的sql查询转换为在crm中的queryexpression或fetchxml]可能的重复(http://stackoverflow.com/questions/35955040/convert-my-sql-query-to-queryexpression-or-fetchxml-in-crm) –