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)

Understanding where-clause in a while-select Statement

(0) ShareShare
ReportReport
Posted on by

Hi Community,

I am trying to understand this select Statement, especially the last line.

    while select VehicleId, StartDate, EndDate
        from rentTable
            where rentTable.VehicleID == this.VehicleID 
                && rentTable.RecId != this.RecId

with the last line, do You there clarify that this new Records RecId is not equal with one RecId of the rentTable ?

I basically say "Choose for me from the rentTable, those VehicleIds which are the same as the one I have entered"

and with the second where clauseI clarify also that None of the records RecIds selected, are the same as my new records recId ?

This is I guess also a good way to separte selected records from the new record created, right ?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at

    In 2nd part of where clause it is saying

    "search from all records except current record" OR "Search from all records except me"

    The first part says what you have mentioned above "Only those records where VehicleId is same as current value of vehicle id"

    combine it becomes as

    "Select VehiceID, startDate and EndDate from all records where VehicleId is same as current value, excluding current record in search results"

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
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
Basit Profile Picture

Basit 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans