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

SQL Prompt Formatting Off not applying to a VALUES construct

Using the new switch 'SQL Prompt Formatting Off' to keep a list of attributes in a VALUES constructor from being formatted, I noticed that the comments I'd placed between statements are being moved to the preceding line, and the comma is being placed on a new line.

Original query:
SELECT y
FROM (VALUES 
		-- SQL Prompt Formatting Off
			-- Thing 1
				(1),
			-- Thing 2
				(2)
		-- SQL Prompt Formatting On 
) AS x(y)

Formatted query:
SELECT x.y
FROM
	(
		VALUES
		-- SQL Prompt Formatting Off
			-- Thing 1
				(1)-- Thing 2
			,
				(2)
		-- SQL Prompt Formatting On 
	) AS x (y)
a.higgins
0

Comments

5 comments

  • David Priddle
    Hi a.higgins,

    We can reproduce this here, so I'll take a look into fixing it.

    Thanks for your help!

    Best regards,

    David
    David Priddle
    0
  • David Priddle
    Hi a.higgins,

    We've got a fix for this which should be in the next beta release.

    Best regards,

    David
    David Priddle
    0
  • David Priddle
    Hi a.higgins,

    Sorry, bit of miscommunication, the fix should be in the latest beta release. Do let us know if it solves your issue.

    Best regards,

    David
    David Priddle
    0
  • a.higgins
    Looks good, thank you!
    a.higgins
    0
  • a.higgins
    Looks good, thank you!
    a.higgins
    0

Add comment

Please sign in to leave a comment.