SQL Prompt is not formatting IF statement correctly
BrienKing
Posts: 30 Bronze 3
in SQL Prompt
SELECT * FROM [#HeldFunds] WHERE [HeldAmount] > 0
DROP TABLE [#HeldFunds]
END ELSE BEGIN
SELECT * FROM [#HeldFunds2] WHERE [HeldAmount] > 0
DROP TABLE [#HeldFunds2]
END
Tagged:
Answers
Brien King
brien@classicsoft.com
If I use default_lowercase on 9.2.9 I get this result with indentations:
If you're not on the latest version trying updating and test again.
In this version everything is all left justified.
This is what is looks like after being formatted:
What it should look like is this:
Brien King
brien@classicsoft.com
What I'd suggest is look at the whitespace and the control flow sections. Watch out for checking the "wrap if longer than" items. I've had some strange behavior here when these are applied with certain values.