How can we help you today? How can we help you today?

New "Edit Formatting Styles" beta feature for SQL Prompt

SQL Prompt version 7.3.0.422

Is there a way to keep CTE queries from being nested within the "WITH" clause with the beta version of SQL Prompt Format SQL command? When I have a "WITH" clause with multiple CTE queries, after applying "Format SQL" the new formatting style nests the queries with a lot of white space left over.

Example:
WITH query1 
AS (SELECT col1
        FROM table1

    ),
query2 
                        AS (select col1
                               from table2)
select 1
  from query1 AS q1
   join query2 AS q2
      on q1.col1 = q2.col2;
Nathanial
0

Comments

6 comments

  • David Priddle
    Hi Ngainer,

    Unfortuantely I'm having trouble reproducing this here. Could you email across your formatting style to me at david.priddle@red-gate.com please? You'll find the directory they're stored in at the top of the formatting styles window:

    xjfoRbe.png
    David Priddle
    0
  • David Priddle
    Hi Ngainer,

    We think we've got a fix out for this in the latest release. Would you be able to try it out and let us know if it fixes it?

    Best regards,

    David
    David Priddle
    0
  • Ngainer
    David,

    I would be glad to. Let me know when it is availabile and I will test it out.

    Thank you!


    Nathanial
    Ngainer
    0
  • David Priddle
    Hi Ngainer,

    Apologies, the build should be out through check for updates now, or you can download it directly from here.

    Best regards,

    David
    David Priddle
    0
  • Ngainer
    David,

    I have tested the fix and everything seems to be working as expected. The version I'm using is 7.3.0.450. Just giving this for validation.

    Thank you for fast feedback. I'm very impressed!


    Nathanial
    Ngainer
    0
  • David Priddle
    Hi Nathanial,

    Glad it's working for you!

    Best regards,

    David
    David Priddle
    0

Add comment

Please sign in to leave a comment.