Summarize script ignoring certain query patterns
kevriley
Posts: 129 Gold 1
in SQL Prompt
I'm using SQL Prompt 7.5.1.1000
When I choose Summarize Script for the following query
I get the results
Notice how the outer table reference is listed but not the table in the subquery, nor the scalar function.
I would expect these to show in the summary, as they are user objects referenced by the query.
When I choose Summarize Script for the following query
USE [AdventureWorks2014] GO select (select top 1 emailaddress from Person.EmailAddress), dbo.ufnGetPurchaseOrderStatusText(1) from Person.Person
I get the results
Notice how the outer table reference is listed but not the table in the subquery, nor the scalar function.
I would expect these to show in the summary, as they are user objects referenced by the query.
Comments
Thanks for the suggestion. If I'm understanding correctly, you are suggesting that SELECT statements should be expandable in the Summarize Script feature so that you can see any subqueries in the tree.
At the moment we have basic SELECT statement handling in Summarize Script, we only show whether it is a SELECT FROM <table> or SELECT <expression>.
If you think this would be a useful feature, would it be possible to add the suggestion on our UserVoice page to allow other users to vote on it?
https://redgate.uservoice.com/forums/94413-sql-prompt
Best wishes,
Michael Clark
Technical Lead, SQL Prompt
Technical Lead, SQL Monitor
Link here for anyone else reading this post who wants to vote: https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/19043938-include-any-referenced-object-in-summarize-script
Riley Waterhouse Limited
Twitter: @kevriley