Question:
Why does SQL server indicate wrong line number in stored proc when error occurs in compilation?
Wadoj V
2006-06-16 09:57:15 UTC
I have a big stored proc (6000 lines).
If an error occurs when compiling it, SQL server indicates a line number that does not match the actual line where the error occurs.
SQL server 2005, using SQL server management studio.
Three answers:
Steve S
2006-06-16 10:36:43 UTC
Many compilers do this.



They point not to the source of the error but the first spot where there is an actual problem.

This is usually the line after the source of the error. The error points to the beginning of that line instead of the end of the previous.
sinkablehail1978
2006-06-16 17:12:07 UTC
SQL server has always done this.
LD C
2006-06-16 17:00:48 UTC
Because it Bytes!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...