Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

CTEs in SmartList Builder?

(0) ShareShare
ReportReport
Posted on by

Sigh.....can you not use a CTE in a SQL script for SmartList Builder?

The CTE works, when I run it in SQL.  But, when I copy the script into SmartList Builder, it's giving me a message saying that the "SQL script is invalid".

I really don't want to have to create a view.  The CTE is pretty simple and convenient.

Thanks!

John

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    on at
    RE: CTEs in SmartList Builder?

    I solved this by modifying my CTE to be a "regular" select statement.  

    So, I'm all set.

    Thanks!

    John

  • Community Member Profile Picture
    on at
    RE: CTEs in SmartList Builder?

    Hi Mike:

    That's true.  And, I have done so, before.  

    But, there's some "red tape" that I have to go through in order to place views in production.  I was hoping that SLB could simply use a CTE script, just as it can use a "select" script.  

    I didn't want to have to go through "protocol" with a separate department.  :)

    Thanks!

    John

  • Suggested answer
    Mike Bufano Profile Picture
    1,484 on at
    RE: CTEs in SmartList Builder?

    John,  Why not create a view using your CTE statement?

    Then you can add the view to Smartlist Designer or Smartlist Builder

    Don't forget to run Grant.sql and then also (if using smartlist builder) grant access to the view through the smartlist builder interface.  (you have to explicitly check the tables and views that you want to include in Smartlist Builder)

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 GP (Archived)

Featured topics

Product updates

Dynamics 365 release plans