Contents Index Lesson 2: Debug a stored procedure Diagnose the bug

ASA SQL User's Guide
  Debugging Logic in the Database
    Tutorial: Getting started with the debugger
      Lesson 2: Debug a stored procedure

Run the debugger_tutorial procedure

The debugger_tutorial procedure should return a result set consisting of the top company and the value of products they have ordered. As a result of a bug, it does not return this result set. In this lesson, you run the stored procedure.

To run the debugger_tutorial stored procedure

  1. In the Sybase Central left pane, open the Procedures and Functions folder.

  2. Execute the procedure.

    Right click the debugger_tutorial procedure and choose Execute from Interactive SQL from the popup menu.

    An Interactive SQL window opens and the following result set is displayed:

    top_company top_value
    (NULL) (NULL)

    This is clearly an incorrect result. The remainder of the tutorial diagnoses the error that produced this result.

  3. Close the Interactive SQL window to clear your workspace.


Contents Index Lesson 2: Debug a stored procedure Diagnose the bug