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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Not equals to relationship in Dynamics Query

(0) ShareShare
ReportReport
Posted on by 10

Hello All, This will come across as a Newb question to you, but what i am trying to replicate is the following query in Dynamics Query Object 

SELECT Table1.Field1, Table1.Field2, Table2.Field1, Table2.Field2,

FROM     Table1 INNER JOIN

                  Table2 ON Table1.Field1 EQUALS Table2.Field2
AND
                  Table1.Field2 (DOES NOT EQUAL) Table2.Field2

It is this second part Highlighted above (   Table1.Field2 (DOES NOT EQUAL) Table2.Field2) that i am having issues with. 

(Does not Equals) option does not exist in Relations and i have tried using range where in the range i put !=Table2.Field2 but it does not seem to work. How can i go about doing this??

If I created  method would i be able to use xx  to create a range, I am having a hard time understanding what i need to declare in the method as i am very new to x++. Any Guidance would be appreciated

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,049 Super User 2025 Season 2 on at

    Hi Razamatazz,

    I think the range could work. Did you put the range value between brackets? e.g.

    (Table1.Field2 != Table2.Field2)

    Can you share your coding so we can try to help you?

  • razamatazz Profile Picture
    10 on at

    I was using the Properties for Range in the Query Object, so far i have no written any code. I was thinking about creating a method in the query, but was not finding any documentation on what i need to do to do so, all i am finding it how to create a whole query 

  • razamatazz Profile Picture
    10 on at

    Thanks, it was the brackets. it worked.  Much Much Appreciated....

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans