none
SQL Server 2008 Management Studios: Why do I get "SQL text cannot be represented in the grid pane and diagram pane." ?

    Question

  • SQL Server 2008 Management Studios: Why do I get "SQL text cannot be represented in the grid pane and diagram pane." ?

    The sql query actually does work and I verified that the query results are correct, but I get a popup telling me that "SQL text cannot be represented in the grid pane and diagram pane."

    Why?  It's valid SQL language and gets correctly interpreted when run, so why don't the grid pane and diagram pane interpret accordingly?

    Here's the query: 

    SELECT     Gender, [Student Count], SUM([Student Count]) OVER () AS Total, 100 * [Student Count] / (SUM([Student Count]) OVER ()) AS Pct_Total
    FROM         (SELECT DISTINCT Gender, COUNT([Student Name]) AS [Student Count], CASE WHEN [Exit Date] IS NULL THEN 'Yes' ELSE 'No' END AS Enrolled
                           FROM          MIA_2013_14.dbo.cra_enroll_all_v2
                           WHERE      ([Entry Date] >= CONVERT(DATETIME, '2013-08-05 00:00:00', 102)) AND ([Exit Date] IS NULL) AND (SPED = 1)
                           GROUP BY CASE WHEN [Exit Date] IS NULL THEN 'Yes' ELSE 'No' END, Gender) iqr

    Thursday, September 19, 2013 10:16 PM

Answers

  • This error occurs when you are using the VIEW designer.  There are many reasons, including complex subqueries, which cause the view designer to fail and generate this error.

    Friday, September 20, 2013 3:36 PM

All replies

  • This error occurs when you are using the VIEW designer.  There are many reasons, including complex subqueries, which cause the view designer to fail and generate this error.

    Friday, September 20, 2013 3:36 PM
  • So this is a shortcoming in Management Studio?

    What a shame. The diagram pane speeds up production for me. Now I have to go back to the hand-coding era whenever I want to use the Over() function.

    Friday, September 20, 2013 4:12 PM