SqlDbx Forum

SqlDbx

You are not logged in.

#1 2014-05-27 07:35:57

geo
Member

Header comments dropped from CREATE/ALTER

Header comments are dropped when creating/modifying a proc/view..., for example

/*
    PROC TITLE...
    Author...
    Change history...
*/
alter proc abc as
print 'hi'

go

Running this in SSMS would keep the comments, SQLDBX would drop them.
Everything before the create/alter (until the previous GO if any) should be included (can only be comments, since CREATE/ALTER must be the first statement in the batch)
Same for views etc.

Offline

#2 2014-05-27 10:52:37

sqldbxhelp
Administrator

Re: Header comments dropped from CREATE/ALTER

That was done on purpose many years ago. SQL Server used to behave inconsistent with comments before create statement.
Probably it's time to revisit this issue

Offline

#3 2014-11-04 10:54:36

geo
Member

Re: Header comments dropped from CREATE/ALTER

Currently the only was to create/alter objects without losing header comments is wrapping the code in an exec('...')

Perhaps you could provide an option on the Advanced menu that takes care of this, doubling all embedded quotes?

Offline

#4 2015-04-20 05:13:13

geo
Member

Re: Header comments dropped from CREATE/ALTER

Any progress? A bit annoying having to use another tool for create/alter proc, just to preserve the comments...

Offline

#5 2015-09-25 13:24:16

daveblack
Member

Re: Header comments dropped from CREATE/ALTER

I agree with geo. This is seriously annoying.

There are a small handfull of things that I must resort to SSMS for, but this shouldn't be one of them.

Offline

#6 2015-09-25 18:13:16

sqldbxhelp
Administrator

Re: Header comments dropped from CREATE/ALTER

This is fixed and will be available in a next release

Offline

#7 2020-11-03 03:30:52

RickRadcliffe
Member

Re: Header comments dropped from CREATE/ALTER

Peo wrote:

Currently the i like is was to use phentermine alternatives available over the counter create/alter objects without losing header is wrapping the code in an exec('...')

Perhaps you could  provide an option on the Advanced menu that takes care of this, doubling all embedded quotes?

SQL Replication - Missing Stored Procedure Comment Header – Learn ... however, the comment headers are removed at the subscribers. ... Move the comment header to between the lines ALTER/CREATE PROC and AS.

Last edited by RickRadcliffe (2023-07-08 17:27:46)

Offline

Board footer

Powered by FluxBB