Options

Show SP parameter types incompatible with leading comma

ewhippleewhipple Posts: 10
edited September 16, 2013 3:34AM in SQL Prompt
When both of these options are enabled:
  • Inserted Code -> Objects & Statements -> EXEC Statements -> Show parameter data types
  • Format -> Commas & parentheses -> Commas in multiple-line statements -> Place commas at start
the output is hard to read, tedious to edit, and wasteful of space. SQL Prompt 5.3 did this the same way.
EXEC testproc2
   @parm1 = NULL
 , -- bit
   @parm2 = NULL
 , -- bit
   @parm3 = NULL
 -- bit
This might work better if the parameter types were inserted as block comments and before the comma instead of inline and after.
EXEC testproc2
   @parm1 = NULL /* bit */
 , @parm2 = NULL /* bit */
 , @parm3 = NULL /* bit */
The effect on the trailing-comma case would be minimal.
EXEC testproc2
   @parm1 = NULL /* bit */,
   @parm2 = NULL /* bit */,
   @parm3 = NULL /* bit */


--
SQL Prompt 6.0.0.411 in SSMS 2012 (11.0.3128.0)

Comments

Sign In or Register to comment.