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 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

I have the same question (0)
  • Suggested answer
    Mike Bufano Profile Picture
    1,484 on at

    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)

  • Community Member Profile Picture
    on at

    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

  • Verified answer
    Community Member Profile Picture
    on at

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

    So, I'm all set.

    Thanks!

    John

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans