我有一個場景,我想要從具有多個位置地址標記爲其他鏈接實體中的當前地址的實體中獲取人數。FetchXML:獲取基於鏈接實體的字段的記錄數
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" aggregate="true">
<entity name="client">
<attribute name="clientid"/>
<attribute name="name"/>
<attribute name="createdon"/>
<order attribute="name" descending="false"/>
<link-entity name="locationadd" from="clientid" to="clientid" alias="aa">
<attribute name="locationadd" aggregate="countcolumn" />
<filter type="and">
<condition attribute="isthiscurrentadd" operator="eq" value="1"/>
</filter>
</link-entity>
</entity>
</fetch>
請完善你的問題,指定更多的細節和實體 –
@GuidoPreite這是SQL查詢,我要轉換爲Fetchxml的真實姓名。 從ifx_client [代碼]選擇ifx_name,計數(ifx_isthiscurrent),ifx_locationaddress其中ifx_client.ifx_clientid = ifx_locationaddress.ifx_clientid和ifx_isthiscurrent = 1組由具有ifx_name計數(ifx_isthiscurrent)> 1 [代碼] – Neodine