please delete

torsten.strausstorsten.strauss Posts: 271 Silver 3
edited August 20, 2017 1:22PM in SQL Prompt
Hi Redgate Team,

The code
BEGIN CATCH
@TRANCOUNT > 0 AND XACT_STATE() <> 0
ROLLBACK TRAN;
THROW;
END CATCH;
GO

will be formatted like this:

BEGIN CATCH
@TRANCOUNT > 0
AND XACT_STATE() <> 0
########ROLLBACK TRAN;
####THROW;
END CATCH;
GO

But referring to my formatting style it should look like this:

BEGIN CATCH
@TRANCOUNT > 0 AND XACT_STATE() <> 0
########ROLLBACK TRAN;
####THROW;
END CATCH;
GO

Can you please fix the line break after AND or ensure it will be aligned with the IF statement - I guess it is a bug in the formatting algorithm.

Thanks!

Torsten
Friend of Redgate

Comments

  • Hi Torsten,

    Thanks for posting!

    Can you please share your formatting style file so that I can try to reproduce the issue? I failed to format your syntax sample using SQL format as it's an incorrect syntax. Do you have other samples I can try again?

    Kind regards,

    Tianjiao Li
    Product Support Engineer
    Kind regards

    Tianjiao Li | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.