When I use SQL Server and there\'s an error, the error message gives a line number that has no correlation to the line numbers in the stored procedure. I assume that the dif
In TSQL / Stored Procedures
You may get an error such as:
Msg 206, Level 16, State 2, Procedure myproc, Line 177 [Batch Start Line 7]
This means that the error is on line 177 in the batch. Not 177 in the SQL. You should see what line number your batch starts on, in my case [7], and then you add that value to the line number to find what statement is wrong