How to stop indent the BEGIN ... END block?
ogrishman
Posts: 81 Bronze 4
Hi there,
I want to know if it's possible to disable the indentation of the BEGIN ... END block. Below is a sample code to demo what I want.
Thanks.
I want to know if it's possible to disable the indentation of the BEGIN ... END block. Below is a sample code to demo what I want.
USE master; GO IF DATABASEPROPERTYEX(N'testdb', N'Version') IS NOT NULL BEGIN ALTER DATABASE testdb SET OFFLINE WITH ROLLBACK IMMEDIATE; DROP DATABASE testdb; END
Thanks.
Comments
I don’t think this is exposed in the UI but you can change this by editing the following file: And setting <IndentBeginToken> to False.
I'm really sorry this is such an awkward way of setting what should be a common option. I don't know why it isn't in the UI so I'll have a look into seeing if we can put in an extra checkbox for it now.
Thanks,
Aaron.
A support call has been created for you HERE. You will require a RedgateID to be able to view the support call via your web browser.
Via our call logging system, I have set to you an email with a SQL Prompt Style attached where the indent value has been set to zero. Otherwise all other options are as per the default style. To import the style, please follow the advice in this Help ARTICLE.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
It's under Tabs & wrapping as "Indent BEGIN…END blocks":