Hi experts,
when I create a query in SQL Server like below:
STEP1:
select EcoResCategoryHierarchy.name, * from Inventtransorigin
join Inventtrans
on Inventtransorigin.recid = Inventtrans.Inventtransorigin
join INVENTDIM
on INVENTDIM.INVENTDIMID = Inventtrans.INVENTDIMID
join InventTable
on InventTable.itemid = Inventtransorigin.itemid
JOIN EcoResProduct
ON InventTable.Product = EcoResProduct.RecId
left JOIN EcoResProductCategory
ON EcoResProduct.RecId = EcoResProductCategory.Product
left JOIN EcoResCategoryHierarchy
ON EcoResProductCategory.CategoryHierarchy = EcoResCategoryHierarchy.RecId
where Inventtrans.DATEFINANCIAL = '2017-04-11 00:00:00.000'
--> The results when I Excute this above query:
STEP2:
And I create a query in AX AOT like pictures below:
--> when i use this Query:
--> The result
-----------------------------------------------------------------------------------------------------------------------
Next, with the query in STEP1, I add one more range "and EcoResCategoryHierarchy.name = 'DANH MUC HANG MUA'"like:
STEP1-A
And then, I add one more range for the query in STEP2:
STEP2-A
and the result:
The result in STEP1-A and STEP2-A is not same.
I think the query in STEP2-A not filter with range (Category hierarchies).Name
Anyone helps me, please?
NOTE: I'm customizing the Function: Closing and adjustment
The system's query is: InventTransAdjustment
And I want to add range range (Category hierarchies).Name to this query.
Thanks all!
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (