How Do I Tell Which Line Contains the Error?

  • I just received an error in my code.

    Msg 207, Level 16, State 1, Line 76

    Invalid column name 'PDP'.

    This is something I should already know by now, but how do I tell which line is line 76? If I just count down 76 lines there is a blank line.

    Thanks.

  • CTRL-G

    enter line number

    or you can just double-click on the message in the results pane

  • Thanks again, Pam! You are a great help!

  • The Best way is for you to add a Try Catch statement.

    Look at the image below, there is a code intended to fail and show you the line number on which it failed.

    QUIGROUP- Need a Certified experienced DBA for a project or troubleshooting? Need help with programming, database recovery, performance tuning, ETL, SSRS or developing new databases? Contact us.. 1-786-273-9809

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply