Hello,
I need to search the AX 2012 ItemId unit (include purch.united, Sales.United, Invent.United, Invent.CountingUnitIed, InventTable.BomUnited) and get have different unit of the ItemId.
I use SQL had problem:
I found AX 2012:
INVENTTABLEMODULE use field MODULETYPE: 0(Invent), 1(purch), 2(Sales) ,
and have field UnitId , CountingUnitId and
InventTable have BOMUnitId
My SQL:
select IT.ITEMID , ITM.MODULETYPE ,ITM.UNITID ,ITM.COUNTINGUNITID ,IT.BOMUNITID
from ECORESPRODUCTTRANSLATION as ET left join (INVENTTABLE as IT left join INVENTTABLEMODULE as ITM on IT.ITEMID=ITM.ITEMID) on IT.PRODUCT=ET.PRODUCT AND ET.LANGUAGEID = 'en-us'
where ITM.UNITID <> ITM.COUNTINGUNITID or ITM.UNITID<>IT.BOMUNITID OR ITM.COUNTINGUNITID<>IT.BOMUNITID
order by IT.ITEMID DESC
Please help fix it to right.
Thanks in advance.
Br, Jen
*This post is locked for comments