Announcements
No record found.
I want to Use IN clause in SELECT Query. e.g.
SELECT USER_NAME FROM USERGROUPS WHERE USER_NAME IN ('A','B','C')
Please share exact query if possibleThanks
Bashir Ahmad
*This post is locked for comments
This is a type of problem that you should resolve by opening the specification, not by asking in a forum.
Refer to Select Statement Syntax next time. This time, I can tell you that IN() isn't supported by any version of Dynamics AX. Nevertheless you can add several ranges.
So as Martin said, in() is not supported.
So you are stuck with either concatenating the values and adding them as 1 range, or, if the number of such values can be large and exceed the range string limit, you can consider an exists join to the table containing these values (or a temp table you populate on the fly)
I use a temporary table, and make a joins tables.
I know this is old post but I want to do exactly the same thing. Is possible to share the code?
Which code? There are several solutions mentioned above.
Update: I see that shinystar111 created a separate thread (How to do WHEREIN or contain in x++?), therefore let's not duplicate the discussion here.
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Joris dG 5
Alexey Lekanov 2
Henrik Nordlöf 2 User Group Leader