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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Waht is the best way to Delete records from a In Memory table since Not in is not supported in X++ query

(0) ShareShare
ReportReport
Posted on by

I need delete some records from VendAccruedPurchasesTmp_NA table. I tried to add filter in the Report design. But I didn't find the NOT IN operator in SSRS. So I try to delete them from VendAccruedPurchasesDP. Also NOT IN is not supported in X++ query. It seems I have to create another temp table and insert the Purchids that I need to delete. Then use notexists join to delete the records.  Is this the only way to do it. Does anyone knows any better ways?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Waht is the best way to Delete records from a In Memory table since Not in is not supported in X++ query

    Thanks Nitesh.

    I'm still researching on how to use container to do it. Will keep you updated.

    If you have good examples please do share.

  • Community Member Profile Picture
    on at
    RE: Waht is the best way to Delete records from a In Memory table since Not in is not supported in X++ query

    Hi Martin,

    I want to filter the data from the report. what happened the data are generated due to incorrect setup on matching policy. The setup has been corrected. But the DB has unclean data from before correcting the setup.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Waht is the best way to Delete records from a In Memory table since Not in is not supported in X++ query

    Hi Anna,

    The way you are thinking that also you can do, this is one of the way to implement the logic.

    I suggest you not to create temp table to implement your logic, its having overhead of creating table object in AOT.

    may be you can do following:

    create a container and have purchid in it.

    analyse  VendAccruedPurchaseDP class and find out where it inserts record in VendAccruedPurchasesTmp_NA table

    there you should have a validation and condition based on container purchid

    this logic will make you modify only the class logic

    Please verify and update us if this helps you.

  • Martin Dráb Profile Picture
    235,876 Most Valuable Professional on at
    RE: Waht is the best way to Delete records from a In Memory table since Not in is not supported in X++ query

    You normally use delete() method in AX to delete data from In Memory temporary tables.

    Nevertheless I'm not sure what you're trying to achieve with all those ranges, NOT IN operators and joins. You're saying that you use join to delete data, but join won't delete anything, it will merely filter data. Do you want to delete data or filter data?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans