Forum

What is SQL query c...
 
Notifications
Clear all

What is SQL query checker? How do we find errors in the query?


kumar BI
Posts: 18
 kumar BI
Topic starter
(@kumar BI)
Joined: 1 year ago

What is mean by sql query checker and what is the most efficient whay to find errors in the query?

1 Reply
Vikky
Posts: 47
 Vikky
(@Vikky)
Joined: 1 year ago

I will tell you the easiest way to find syntax errors in SQL Server Management Studio.

 

When you actually execute your queries in the SQL Server Management Studio, sometimes it will tell you the red color Pease of the code at the bottom with the line number.

 

New people confuse with the error numbers and will not able to find what exactly they want.

 

For example, the older version of SQL editor line number is relative to the current batch.

 

If you are running a set of commands large files with hundreds of lines that error like maybe 10 or 20 and the actual error on the script line it shows something like 95 or 100.

 

After the version SQL Server Management Studio 2014 it started displaying the error number from the start of the file relative to the batch so that it made it easier but some of them are not using 2014 most of the time.

 

In 2016 the SQL Server Management Studio started showing the relative to the batch again and we went back to the relative to the batch.

 

You can use some simple addition to figure out various syntactical errors but overall, we don’t like inconsistency. These errors between different versions.

 

We are often jumping around between different SQL Server Management studio versions.

We don't need a separate SQL query checker tool to find errors in SQL. 

The way to get around that does not look at the error line number at all.

 

What I mean by that is just simply double click the error message and it will take you to the line that it has the error.

 

Many people don’t know we can click the error message text to get where the actual problem occurred.

 

This is one of the easiest SQL query checker method which I follow. 

 

Hope it is useful for you. 

 

Reply
Share: