Inconsistent new line behavior with comments

a.higginsa.higgins Posts: 90 Bronze 2
edited October 6, 2016 9:25AM in SQL Prompt
I make frequent use of comment blocks to separate logical portions of a script (/*Comment*/).

I've noticed that SQL Prompt will sometimes reformat things to start after a comment line, such as the following example:
/* Create Stuff */
CREATE TABLE #x (a INT)
CREATE TABLE #y (b INT)
CREATE TABLE #z (c INT)

/* Drop Stuff */
DROP TABLE #x
DROP TABLE #y
DROP TABLE #z

When I reformat the script, it turns to:
/* Create Stuff */
CREATE TABLE #x
	(
		a INT
	)

CREATE TABLE #y
	(
		b INT
	)

CREATE TABLE #z
	(
		c INT
	)

/* Drop Stuff */ DROP TABLE #x -- notice this is now on one line
DROP TABLE #y
DROP TABLE #z

I've seen similar odd results from various statements, including DROP TABLE, SELECT, CREATE TABLE, SET XACT_ABORT ON, TRUNCATE TABLE, INSERT INTO, etc.

Is there a setting or configuration I can use to say, in effect, "Preserve new lines after comment blocks"?

Comments

Sign In or Register to comment.