Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging with code break points

Status
Not open for further replies.

UnsolvedCoding

Technical User
Jul 20, 2011
424
0
0
US

In VBA you can place stops by using F9 to stop the code so you can check things and can do things like hover the mouse over something or use the watch window to see the value of an item.

Is there a way to do the same things in SQL?

I have a very annoying stored procedure to figure out and have to go line by line or less to find the issues.
 
When I trouble shoot code, I will look for places where I need to know what is happening and then I will put in PRINT statements.

For example, I want to know what value is entered into @somevariable. I will have a print statement like:

PRINT @somevariable

I'll do this throughout the code. I'll also add print statements that just return the GETDATE() so I know how long each section runs.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top