Query Formatting - Error Laying Out SQL message

PhilParkinPhilParkin Posts: 6
edited February 9, 2017 11:47AM in SQL Prompt
Hello Redgate. Using SQL Prompt V7.3.0.775, when I attempt to reformat the following code, I get an 'Error laying out SQL' dialog box.
SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL))
    FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) a(n)
    CROSS JOIN (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) b(n);

The error appears to be related to the CROSS JOIN. Is this a known issue?

Thanks.

Comments

  • Hi Phil,

    I couldn't reproduce your problem running on the latest version of SQL Prompt. When I execute "Format SQL" I am given:
    SELECT  ROW_NUMBER() OVER ( ORDER BY ( SELECT   NULL
                                             ) )
        FROM    ( VALUES ( 0), ( 0), ( 0), ( 0), ( 0), ( 0), ( 0), ( 0), ( 0),
                ( 0) ) a ( n )
                         CROSS JOIN ( VALUES ( 0), ( 0), ( 0), ( 0), ( 0), ( 0),
                ( 0), ( 0), ( 0), ( 0) ) b ( n );
    

    Would it be possible to upgrade to SQL Prompt 7.4 beta and try again?

    Are you using our new experimental formatter?

    Thanks,
    Michael
    Michael Clark
    Technical Lead, SQL Monitor
Sign In or Register to comment.