Little things just stop working.

It seems like once a week some little feature of SQL Prompt quits working for me. This week, it's aligning data types in variable declarations. It used to work, then it just stopped--the setting is completely ignored. 



Checking and un-checking the option does not change the preview of the current query, nor does it affect the code when I format it in the editor. It has quit working in both Visual Studio and SSMS.

Version is: 9.4.5.7296, but it quit working before this version.
Tagged:

Best Answer

  • Alex BAlex B Posts: 1,158 Diamond 4
    Hi @Dave Pendleton,

    The issue here is that you are using separate DECLARE statements whereas this style option is related to a comma separated list of variables and their data types in a single DECLARE statement.  So if you were to use:
    DECLARE @MasterPath nvarchar(512),<br>@LogPath nvarchar(512),<br>@ErrorLog nvarchar(512),<br>@ErrorLogPath nvarchar(512),<br>@Slash varchar = CONVERT(varchar, SERVERPROPERTY('PathSeparator'));
    then it will align the data types correctly.

    If you would like the option to have this work across DECLARE statements then you will need to raise a Uservoice suggestion for this on the SQL Prompt Uservoice Forum.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.