Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

X++ string functions

(0) ShareShare
ReportReport
Posted on by 2,055

I need string functions which can used in X++. Specially I need sub string function, how we can get sub string using SQL query.

*This post is locked for comments

  • Verified answer
    Martin Dráb Profile Picture
    234,615 Most Valuable Professional on at
    RE: X++ string functions

    X++ queries don't support such a kind of things. Consult the documentation (Select Statement Syntax [AX 2012]) if you don't know what's supported.

    To achieve what you need, create a view with a computed column, handle the logic in the application layer or, as the last resort, run a direct SQL query.

  • Nadeem Bhatti Profile Picture
    2,055 on at
    RE: X++ string functions

    Sorry actually I need sql sub string function to use in X++. I have try the following code but its not working.

       select subStr(ChequeNum,1,3)  from bankChequeTable

           group by bankChequeTable.ChequeNum;

       info(bankChequeTable.ChequeNum);

  • Suggested answer
    Martin Dráb Profile Picture
    234,615 Most Valuable Professional on at
    RE: X++ string functions

    X++ function for substrings is called simply subStr().

    Nevertheless database servers don't understand X++, so you can't use X++ function in SQL commands.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Kempeth Profile Picture

Kempeth 4

#1
Andy Adamak Profile Picture

Andy Adamak 4

#1
Community Member Profile Picture

Community Member 4

Featured topics

Product updates

Dynamics 365 release plans