web
You’re offline. This is a read only version of the page.
close
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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans