Question

If there's one thing that I hate about SQL Server, it's the horribly unhelpful error messages. My favorite is "Incorrect syntax near..." because it provides almost no hint as to what's wrong.

Are there any tools to get a better idea of what's wrong with the statement? Or does anybody have any other helpful hints for figuring these kinds of errors out?

Was it helpful?

Solution

Hm... It is possible to double-click the error message in SQL Management Studio and it will jump to the position where the error occurred.

This is at least sometimes helpful, though it doesn't work 100% of the time. Some errors are definitely too obscure, but since this is everything the database engine tells the outside world, I somehow doubt that there are tools that can provide better help.

OTHER TIPS

It won't help you on SQL 2005, but SQL 2008 has both intellisense and syntax checking built into management studio. Most syntax errors there get the red squggly line that we're familiar with from Visual Studio.

Downside is it only works when connected to a SQL 2008 server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top