June 4, 2013 at 11:48 am
We recently upgraded to SQL Server 2012 and the Query Analyzer defaults to putting all data names inside brackets. Is there a way to change a "setting" so the brackets are not added by default?
Thanks in advance
June 4, 2013 at 1:27 pm
Howard I have 2012, but I'm not sure where, specifically, you are talking about where the objects get bracketed by the quotename() function;
do you mean when you script an object? I did not see a scripting option for that feature when i peeked there.
i don't see intellisense doing anything like that, so i'm not sure where you are seeing this behavior?
Lowell
June 4, 2013 at 4:41 pm
Howard C. BAchtel-438731 (6/4/2013)
We recently upgraded to SQL Server 2012 and the Query Analyzer defaults to putting all data names inside brackets. Is there a way to change a "setting" so the brackets are not added by default?Thanks in advance
If this is occurring when you generate scrips, it's been that way since I can remember (6.5 in my case).
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2013 at 6:31 pm
Sorry,
I should have been more specific in description. The question relates to building queries in SQLMS. A brief sample of a query would be:
Select
[DateInactive],
[Inactive]
The brackets around the fields I believe are meant to be able to handle data names with spaces. I prefer to not have any names without spaces and the brackets are inconvenient at best for my uses. I would like to adjust a "setting" that would not produce the brackets when dragging the data name from the table definition.
Thanks.
June 5, 2013 at 4:29 am
I don't like it either, but can't see any way of turning it off.
I know it's a bit OTT, but I've actually written a program to automate certain 'tweaks' to T-SQL code in line with my own coding preferences - and the removal of redundant [] characters is one of those tweaks, as I got tired/bored of continually doing find/replace.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply