user1022772
user1022772

Reputation: 651

SSRS Removes SQL Query Comments

I've been trying to add comments to SQL in the query pane, but SSRS 2008R seems to remove them.

Have used

/*......*/ 

for block commenting, but they are removed after saving.

Does SSRS support SQL commenting?

Is there anyway to keep comments in?

Upvotes: 2

Views: 968

Answers (1)

Jamie F
Jamie F

Reputation: 23789

When editing SQL in BIDS, don't use the default Query Designer panes if you want to control the formatting of your text. Switch to "Edit as Text" mode and avoid ever switching out. Then comments and text formatting will be preserved.

The graphical UI in the default panes will liberally change the SQL statements. I really dislike that thing, and switch every dataset I touch to "Edit as Text."

Then I do heavy SQL editing in SSMS, with SQL Prompt installed, and paste into the BIDS dialog.

Upvotes: 7

Related Questions