Bug: Surround with Bracket option doesn't affect FROM clause
steveg
Posts: 9
Unchecking the Surround With Brackets option doesn't have any affect in the FROM clause.
(Query Analyzer 8.0.760, SqlServer2000 SP3)
Select * from [MyTable] where id = 1
(Query Analyzer 8.0.760, SqlServer2000 SP3)
Comments
That's highly interesting. We've certainly never seen that before: it's definitely a bug. I'd expect to see this happen if you had a table called "Table" or "View" or some other SQL Server reserved word, however that's clearly not the case here. We'll take a look into it.
Thanks,
Bart
Principal Consultant
bartread.com Ltd
I changed the table name I was using in my original post... The two tables I was dealing with mostly yesterday were called "Name" and "Profile", which both get the bracket treatment.
However, other tables such as "Activity" and "Meeting" are not being bracketed.
Looks like a "this behaviour is by design".
"Name" is definitely a reserved word, at least in certain contexts so I can understand that. I'd have to double-check on "profile" though. SQL Server 2005 has so many reserved words that are only reserved in a particular context. It's a real headache and obviously as time goes on we're gong to have to work on tunng ths behaviour.
Thanks,
Bart
Principal Consultant
bartread.com Ltd