Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Marioi
Posting Yak Master
132 Posts |
Posted - 2005-12-01 : 15:44:41
|
I write sProcs and UDFs in QA typically in 3 batches: IF EXISTS ... DROP PROCEDUREGOCREATE PROCEDUREGO-- Run the procedureGOWhen I get an error like this:Server: Msg 170, Level 15, State 1, Line 6Line 6: Incorrect syntax near '.'. how should I interpret which batch generated it? I've been adding a hard return under each GO from bottom up and rerunning the code to see the last batch that caused the 'Line' to change.Is there a way to see line numbers in code more easily than mentally deducting from the line number on the status bar the line number of the GO statement above the batch? |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-12-01 : 15:51:39
|
| Double clicking the error (in the results pane) usually takes me to the problem area. Slapping in some PRINT statments in strategic places also helps to see where the errors happen.Be One with the OptimizerTG |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-02 : 00:45:27
|
| http://www.sommarskog.se/error-handling-I.htmlMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|