Problem with square brackets in SQL Prompt 6.5.0.326
weswinkler
Posts: 54 New member
SQL Prompt 6.5.0.326 does not appear to honor my choice regarding adding or removing square brackets.
My option setting on the Format>Actions page has the "Add/remove square brackets" checkbox blank. I assume that means to make no change to any square brackets.
However, when I format a simple query
I receive
The layout for spacing and line breaks is expected, but I did NOT expect the square brackets to be removed.
What setting must I use to have SQL Prompt leave square brackets alone?
My option setting on the Format>Actions page has the "Add/remove square brackets" checkbox blank. I assume that means to make no change to any square brackets.
However, when I format a simple query
DELETE sts FROM [dbo].[ScheduleTimeSlots] sts INNER JOIN [dbo].[Schedules] s ON s.ScheduleId = sts.ScheduleId WHERE s.ScheduleJobId = 22
I receive
DELETE sts FROM dbo.ScheduleTimeSlots sts INNER JOIN dbo.Schedules s ON s.ScheduleId = sts.ScheduleId WHERE s.ScheduleJobId = 22
The layout for spacing and line breaks is expected, but I did NOT expect the square brackets to be removed.
What setting must I use to have SQL Prompt leave square brackets alone?
Comments
Do you have "Qualify object names" ticked under format actions? Before we added a separate feature for enclosing all identifiers in brackets in 6.5 this was a pretty common way to add or remove square brackets.
Now that we have both add and remove square brackets as separate features we plan on changing qualify object names so it will preserve the existing brackets. Sorry that this hasn't been implemented yet!
Thanks,
Aaron.
When I uncheck that option, the square brackets behave as expected.
But, I still wish the interaction between the two could be separated.
I like having the objects qualified; in fact I need it sometimes when working with objects in a non-dbo schema. I just don't want SQL Prompt to mess with square brackets unless I explicitly ask for it.
I hope this is resolved in a future release.