Maximize the power of SQL Prompt with SQL Toolbelt Essentials. Watch now.

SQL Formatting Questions

bmaybmay Posts: 1 New member
edited September 3, 2020 4:56PM in SQL Prompt
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

Best Answer

  • David_DDavid_D Posts: 26 Bronze 2
    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.

Answers

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    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 Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • David_DDavid_D Posts: 26 Bronze 2
    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_DDavid_D Posts: 26 Bronze 2
    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.
Sign In or Register to comment.