Parenthesis Grouping

  • In SQL 2005 when you have an open and close parenthesis the two are highlighted to know they belong together. However, in SQL 2008 that does not occur. Is there something that needs to be enabled in SQL 2008?

  • Are you sure you don't have that backwards? It works in 2008 but doesn't in 2005.

    That's because 2008 introduced intellisense and several other code formatting enhancements such as those little collapsible + boxes. They do not work in 2005.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • I don't know about 2008, but the brackets definitely get highlighted in 2005 - just for an instant when you're typing the closing bracket

    ------------------------------------------------------------------------
    Bite-sized fiction (with added teeth) [/url]

  • I have been working exclusively in the 2008 Management Studio for over a year now (beta's), so I don't remember 2005 real well, but 2008, the parenthesis highlighting is definitely working.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • In SQL 2005 SSMS, this is configurable. Under menu "Tools" pick "Options". Expand the "Environment" Option and selct "Fonts and Colors". Make sure "Show settings for:" is set to "Text Editor", and you'll see one of the configurable "Display Items" is "Brace Matching (Highlight)". Select that and you may then make sure the "Bold" option is checked and the "Item foreground" is set to your choice of color -- I like bright red.

    In use, the highlight is enabled as you type the second of a pair of parentheses or delete an adjacent character. Maybe someone else knows how to make the matched paren light up without deleting and re-typing, but that's what I've done to see the pairs.

  • This worked (2008) until I got my new laptop here at work, now it doesn't 🙁 ... it was a very helpful feature.

    FYI, to see matching parens, you can click right after it then hit the left-arrow once.

    If anyone figures it out, please let me know.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply