We recently went to SSMS 2012 (I was using SSMS 2008). It's driving me crazy figuring out how to set the parentheses matching. Is there a TOOLS/OPTIONS feature that can be set? I would think this would be not only a common functionality but almost necessary ! (Automatic matching of syntax pairs gives you immediate feedback on whether syntax elements that must be coded in pairs are correctly paired.)
I do have IntelliSense enabled in TOOLS/OPTIONS but when I click the toolbar "Query"...it shows greyed out.
My initial thought is that you are using too many parentheses ... I rarely use them nested deeply enough that I can't just see the levels.
Lots of code generators stick them in everywhere, unnecessarily, just to avoid having to figure out if they are needed or not! and such Write-Only-Code is a PITA to read, so if that is your problem? I suggest you remove all non-essential parentheses.
I don't write code in SSMS so I'm the wrong person to ask, but doesn't Intellisense look after Open/Close Parenthesis matching?
I don't have "too many" parentheses.... this functionality worked in SSMS 2008. But apparently, I am not familiar with what needs to be changed in SSMS 2012 to make it work.
So what do you use. I just switched to SSMS from QA (from SQL Server 2000 era) when my new laptop is Windows 10. Just can't get it install under Windows 10.
If u want select T-SQL code between two parentheses means put the cursor at the position displayed and pressed CTRL+SHIFT+] and it has selected the code between two corresponding parentheses.
UPDATE: We are going to a new server. I found out that while I'm on the OLD server using SSMS 2012 the IntelliSense won't work. I needed to see that the destination server is running an appropriate version of SQL Server because "IntelliSense does not function against SQL Server 2005 or previous versions". Problem solved. We should be using the new server next week, so we'll see.
folder (where my ISQLW.EXE file lives) [there was no pre-existing file of that name to overwrite, in that folder]
I read of suggestions to replace the existing file in SYSTEM32 (or SysWOW64 on 64-bit systems) - the file should already exist - but I couldn't overwrite the existing file in SysWOW64, it wanted permission that I could not provide
SELECT 'xxx' AS [xxx xxx]] {xxx} xxx]
SELECT 'xxx' AS []]{}]
gives “Syntax error or access violation” in Query Analyser. its the specific sequence of double-close-square-bracket and open and then close curly-bracket. Take any of those out and it works OK, as does changing the order, so this works OK:
SELECT 'xxx' AS [{}]]]
There is no problem with these in SSMS so I reckon it is a bug in QA parsing ... just mentioning it here for any really old codgers ... like me!! ... who might still be using that antique.
The “Syntax error or access violation” has NO line number, so in a long block of code its hard to find the culprit. I did a highlight of the first "half", executed that to check for that error message, and then used a binary-chop t narrow down where the culprit was.