Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Where not exist in AX

Posted on by 100

select sum(CostAmountAdjustment) from inventsettlement
// join tmp

*This post is locked for comments

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: where exists not supporting in ax 09

    You can use the SQL profiler  SQL server management studio to see where this query needs to have some improvements. Possibly an index is missing.

    Is this coding based on standard with a small modification on the Voucher field or is it completely custom?

  • venu123 Profile Picture
    venu123 100 on at
    RE: where exists not supporting in ax 09

    I tried to write sql sub query but at where exists am getting error in x++ nested or subqueries not support

  • Suggested answer
    venu123 Profile Picture
    venu123 100 on at
    RE: where exists not supporting in ax 09
    [deleted]
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: where exists not supporting in ax 09

    DATEDIFF is not supported as command in x++. Can you explain what you want to achieve? I'm still not able to understand your question.

  • venu123 Profile Picture
    venu123 100 on at
    RE: where exists not supporting in ax 09

    nested condition as if sql i trying to do like this

    SELECT CustomerNAme

    FROM Customers c

    WHERE EXISTS (SELECT 0

    FROM Order o WHERE c.customer_id = o.customer_id

    AND DATEDIFF(yr, Orderdate, GetDate()) < 1

  • venu123 Profile Picture
    venu123 100 on at
    RE: where exists not supporting in ax 09

    InventTrans tmp

    InventTrans is a table

  • Sukrut Parab Profile Picture
    Sukrut Parab 71,647 Moderator on at
    RE: where exists not supporting in ax 09

    If you are talking about exist join then it is supported. Syntax looks like below.  

    while select * from salesTable

           exists join salesLine where salesTable.SalesId == salesLine.SalesId

    where condition

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: where exists not supporting in ax 09

    Hi Venu123,

    What is your question here? What is "tmp"?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans