{"id":1175,"date":"2011-09-29T01:45:07","date_gmt":"2011-09-29T06:45:07","guid":{"rendered":"http:\/\/www.dpriver.com\/blog\/?p=1175"},"modified":"2011-10-14T21:06:21","modified_gmt":"2011-10-15T02:06:21","slug":"sql-formatter-option-how-to-place-a-comma-in-the-list-of-parameter-in-execute-statement","status":"publish","type":"post","link":"https:\/\/www.dpriver.com\/blog\/2011\/09\/sql-formatter-option-how-to-place-a-comma-in-the-list-of-parameter-in-execute-statement\/","title":{"rendered":"sql formatter option: how to place a comma in the list of parameter in execute statement"},"content":{"rendered":"

This format option controls where to put comma in the list of parameters of SQL Server execute statement. a line break can be placed after comma, or before comma<\/p>\n

name: exec_parameters_comma_option, default is put line break after comma<\/p>\n

setting path: Execute -> parameter comma option<\/p>\n

\nEXEC<\/span> Spr_store_note<\/span>
\n
@NoteId<\/span> =<\/span> 0<\/span>,<\/span>
\n
@TableTypeId<\/span> =<\/span> @TABLE_CUSTOMER<\/span>,<\/span>
\n
@RecordId<\/span> =<\/span> @CustomerId<\/span>,<\/span>
\n
@Descr<\/span> =<\/span> @Comments<\/span>
\n<\/span><\/div>\n

After set exec_parameters_comma_option to “before comma”, SQL will be formatted like this:<\/p>\n

\nEXEC<\/span> Spr_store_note<\/span>
\n
@NoteId<\/span> =<\/span> 0<\/span>
\n
,<\/span>@TableTypeId<\/span> =<\/span> @TABLE_CUSTOMER<\/span>
\n
,<\/span>@RecordId<\/span> =<\/span> @CustomerId<\/span>
\n
,<\/span>@Descr<\/span> =<\/span> @Comments<\/span>
\n<\/span><\/div>\n

After set exec_parameters_comma_option to “before comma with a space”, SQL will be formatted like this:<\/p>\n

\nEXEC<\/span> Spr_store_note<\/span>
\n
@NoteId<\/span> =<\/span> 0<\/span>
\n
,<\/span> @TableTypeId<\/span> =<\/span> @TABLE_CUSTOMER<\/span>
\n
,<\/span> @RecordId<\/span> =<\/span> @CustomerId<\/span>
\n
,<\/span> @Descr<\/span> =<\/span> @Comments<\/span>
\n<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"

This format option controls where to put comma in the list of parameters of SQL Server execute statement. a line break can be placed after comma, or before comma name: exec_parameters_comma_option, default is put line break after comma setting path: Execute -> parameter comma option EXEC Spr_store_note @NoteId = 0, @TableTypeId = @TABLE_CUSTOMER, @RecordId = @CustomerId, @Descr = @Comments After set exec_parameters_comma_option to “before comma”, SQL will be formatted like this: EXEC Spr_store_note @NoteId = 0 ,@TableTypeId = @TABLE_CUSTOMER ,@RecordId = @CustomerId ,@Descr = @Comments After set exec_parameters_comma_option to “before comma with a space”, SQL will be formatted like this: EXEC Spr_store_note @NoteId = 0 , @TableTypeId = @TABLE_CUSTOMER , @RecordId = @CustomerId , @Descr = @Comments <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18,24,22],"tags":[],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":5}},"yoast_head":"\nThe style of putting comma in the list of parameters of execute<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n