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

SQL Formatting Questions

There are a couple formatting issues I've run into recently, and I can't figure out if it is something in my formatting style that is causing this, or maybe if it's just a bug.  Here is what my code looks like after it is formatted, with the questions as comments.  My style is attached (as .txt, the attach file button wouldn't accept a .sqlpromptstylev2 file).

--Why is there a space after "dbo"?
SELECT *  FROM dbo .Calendar

--BEGIN for indent
BEGIN
	DECLARE @var AS INT
	--Why isn't the SET line indented?
	IF @var IS NULL BEGIN
SET @var = 0
	END
END
SQL Prompt version 10.3.8.15885
bmay
0

Comments

4 comments

  • Jessica R
    Hi @bmay!

    The space after "dbo" appears to be related to the Whitespace>Tab Behavior settings.

    The lacking indent for "SET" seems to be related to the  Control Flow>Short Control Flow statements>Collapse settings.

    Please bear with us while we look into whether this should be expected or not.
    Jessica R
    0
  • David_D
    Hi @bmay,

    Thanks for your patience!

    Great news! The spacing after "dbo" is fixed with the latest SQL Prompt 10.4.1 release here.

    The development team is still working on the second issue where SET is missing the indent.
    David_D
    0
  • David_D
    Hi @bmay,

    Thanks for your patience!

    Great news! The spacing after "dbo" is fixed with the latest SQL Prompt 10.4.1 release here.

    The development team is still working on the second issue, where SET is missing the indent.
    David_D
    0
  • David_D
    Hi @bmay,

    Thanks for your patience!

    We've released SQL Prompt 10.4.2 release here which includes the fix for SET missing indent. Please don't hesitate to reach out if you have any other questions or feedback.
    David_D
    0

Add comment

Please sign in to leave a comment.