Is there a way to get the exact line an error occurs on in Query Analyzer?

by Nov 3, 2018

When we have SQL syntax errors in Query Analyzer we get a Message like this:

>[Error] Script lines: 1-160 ————————

Most of the time, it is easy to figure out why there is a syntax error, however, in some cases we don’t get a lot of details. MS SQL Server Mgmt Studio usually (or gets you close enough)identifies the line number at which the error occurs, making it easy to troubleshoot.

Is there a way to identify the exact line number that an error occurs at?



Thomas Conrad over 4 years ago
Hi Ken,

Sorry for the delay… Generally, ADS supplies the line numbers of the statement where the error occurred and the database server supplies the specifics about the error. We are limited to what is returned by the jdbc driver.

Thanks, Tom