web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Inventory movement query for SQL

(0) ShareShare
ReportReport
Posted on by

Hey Everyone

Is there any SQL qeury

Complete inventory movement  FY 2018 with below fields extracted from database ( with query used for extraction ) for assessment

 

  • Item Number / Description
  • Type of movement (Purchase , Sales, Issuance or Transfer )
  • Date  of movement
  • Amount
  • Quantity
  • Opening Balance of the inventory item as of 1st Jan 2018
  • Closing Balance as of 31st Dec 2018

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    MATTGUO Profile Picture
    22,349 Moderator on at

    Hi geeirfan,

    Query in sql:

    select a.ItemId,a.DatePhysical,a.COSTAMOUNTPHYSICAL,a.DATEFINANCIAL,a.COSTAMOUNTPOSTED

    ,a.qty,

    case when b.REFERENCECATEGORY='0' then 'salesr'

    when b.REFERENCECATEGORY='3' then 'purchase'

    when b.REFERENCECATEGORY='6' then 'Transfer'

    else 'others' end as Type

    from InventTrans a

    left join InventTransOrigin b on a.itemid=b.itemid and a.InventTransOrigin=b.RecId

    where a.DatePhysical between '2018-01-01 00:00:00.000' and '2018-12-31 00:00:00.000'

    and a.itemid='*****' and a.DATAAREAid='******'

    For the balance, you can use inventory values report in system.

  • Suggested answer
    ColbyGallagher Profile Picture
    3,668 on at

    Everything but the Opening balance and closing balances can be retrieved from InventTable joined to InventTrans.   What version of AX are you on?  If you are using 2012 R2 or later, the inventory value cube will provide everything you are asking for.  

  • Community Member Profile Picture
    on at

    we are using AX 2012 R3 cu9

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 4 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans