What are the challenges you face when working across database platforms? Take the survey
Options

Bug: Surround with Bracket option doesn't affect FROM clause

stevegsteveg Posts: 9
edited January 26, 2007 6:24AM in SQL Prompt Previous Versions
Unchecking the Surround With Brackets option doesn't have any affect in the FROM clause.
Select * from [MyTable]  where id = 1

(Query Analyzer 8.0.760, SqlServer2000 SP3)

Comments

  • Options
    Bart ReadBart Read Posts: 997 Silver 1
    Hi Steve,


    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
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Options
    Thanks for the quick response.

    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".
  • Options
    Bart ReadBart Read Posts: 997 Silver 1
    Hi Steve,


    "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
    Bart Read
    Principal Consultant
    bartread.com Ltd
Sign In or Register to comment.