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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Execute SQL Server built in function within a Query Class query

(0) ShareShare
ReportReport
Posted on by

Is it possible to execute SQL Server built in functions within a Query class built query.  For example our implementation has projects and sub-projects.  The report needs to display only the "Project Id" but include information from the sub-projects table.  I tried to the following to no avail:

"ds.addrange (fieldNum (myTable, myField).value (strfmt ('(%1.projectId == substring (%2.subProjectId, 1, 6))', dsProjectTable.name (), dsSubProjectTable.name ()));"

Jim Richardson

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    235,928 Most Valuable Professional on at
    RE: Execute SQL Server built in function within a Query Class query

    It's not possible, as far as I know.

    Regarding projects, you might be able to use ProjTable.ParentId. If you're looking for the root project (not just the nearest parent), it's probably worth maintaining it as a separate field. Filtering will be trivial (and fast) then.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans