0
XML을 Fetch로 변환하려고 시도하는 간단한 방법이지만 아래 오류가 있습니다.SQL을 FetchXML로 변환 하시겠습니까?
Error: Error occurred when parsing the SQL script: Unsupported statement type: DECLARE
DECLARE
@OrganisationId uniqueidentifier
SELECT
cil.mm_topprioritystatus,
cil.mm_achievedcatalogproductName,
cil.mm_achievedcatalogproductstatus,
ci.mm_key
FROM
mm_catalogitemtorganisationlinker cil
INNER JOIN
mm_catalogitem ci on
ci.mm_catalogitemId = cil.mm_catalogitem
where
mm_organisation = @OrganisationId
and ci.mm_key in (
'LEVEL1',
'LEVEL2',
'LEVEL3',
'LEVEL4'
)
위의 fetchXML 버전에 알려 주시기 바랍니다. 당신이 코드에 의해 {organizationid} 자리를 교체해야 물론
<fetch>
<entity name='mm_catalogitemtorganisationlinker' >
<attribute name='mm_topprioritystatus' />
<attribute name='mm_achievedcatalogproductName' />
<attribute name='mm_achievedcatalogproductstatus' />
<filter>
<condition attribute='mm_organisation' operator='eq' value='{organizationid}' />
</filter>
<link-entity name='mm_catalogitem' from='mm_catalogitemid' to='mm_catalogitem' link-type='inner' alias='ci' >
<attribute name='mm_key' />
<filter>
<condition attribute='mm_key' operator='in' >
<value>LEVEL1</value>
<value>LEVEL2</value>
<value>LEVEL3</value>
<value>LEVEL4</value>
</condition>
</filter>
</link-entity>
</entity>
</fetch>
: