Is there a way to turn off Aliases in SELECTs and JOINs from automatically having Brackets around them when SQL Prompt auto-inserts the subclause?

For Example:
SELECT *
FROM    [dbo].[MyTable] mt

when you use the Tab button to expand the column list to all columns you get this:
SELECT  [mt].[Column1],
             [mt].[Column2],
             [mt].[Column3]
FROM    [dbo].[MyTable] mt

instead of this:
SELECT  mt.[Column1],
             mt.[Column2],
             mt.[Column3]
FROM    [dbo].[MyTable] mt

SQL Prompt 3.9 did not put brackets around the Aliases in the SELECTs and JOINs.

Mike
michaelfried
0

Comments

3 comments

  • Anu D
    Thanks for your post.

    I am trying to replicate the issue.

    But it is working fine for me.

    Could you kindly check the detailed version of SQL Prompt you are using?
    You can know the detailed version of SQL Prompt by navigating to SQL Prompt 4 --> About SQL Prompt and version number is displayed on bottom right (just above Close button.)?

    And also if you could let us know the version of Management studio will be of great help.
    Anu D
    0
  • michaelfried
    The SQL Prompt 4 detailed version is 4.0.2.27.

    SQL Server Management Studio Version is 9.00.3042.00.

    Enter the following query in the msdb database in SSMS and then use the Tab key to expand the SELECT statement:
    SELECT	sai.*
    FROM	[dbo].[sqlagent_info] sai
    

    It used to (and should in my opinion) display as follows:
    SELECT	sai.[attribute],
            sai.[value]
    FROM	[dbo].[sqlagent_info] sai
    

    but instead appears with brackets around the aliases:
    SELECT	[sai].[attribute],
            [sai].[value]
    FROM	[dbo].[sqlagent_info] sai
    

    Mike
    michaelfried
    0
  • Anu D
    Many thanks for your explanation.

    I have added this issue as a feature request in our internal tracking system.

    For your reference its id is SP-2769.

    Sorry for any inconvenience caused by this issue.
    Anu D
    0

Add comment

Please sign in to leave a comment.