我正在尝试在fetchXML中建立2个左外连接。我可以完成这个sql语句......
select
a.new_campaignid
, a.new_ContactId
, b.new_campaigncontactstatusId
from
new_ContactCampaignNN AS a
left outer join new_campaigncontactstatus AS b ON a.new_contactid = b.new_ContactId
AND a.new_campaignid = b.new_CampaignId
进入像这样的fetchXML语句?
<fetch mapping='logical' distinct='true'>
<entity name='new_contactcampaignnn'>
<attribute name='new_campaignid' />
<attribute name='new_contactid' />
<filter type='and'>
<condition attribute ='new_campaignid' operator='eq' value='72C9284B-905D-E111-9847-002655325864'/>
</filter>
<link-entity name='new_campaigncontactstatus' from='new_contactid' to='new_contactid' visible='true' link-type='outer' alias='new_contactcampaignnn_new_campaigncontactstatus'>
<attribute name='new_campaigncontactstatusid' />
<link-entity name='new_contactcampaignnn' from='new_campaignid' to='new_campaignid' visible='true' link-type='outer' alias='new_contactcampaignnn_new_campaigncontactstatus1'></link-entity>
</link-entity>
</entity>
</fetch>