This tutorial shows you how to use the debugger to identify errors in stored procedures.
The SQL Anywhere sample database, demo.db, contains a stored procedure named debugger_tutorial, which contains a deliberate error. The debugger_tutorial system procedure returns a result set that contains the name of the company that has placed the highest value of orders and the value of their orders. It computes these values by looping over the result set of a query that lists companies and orders. (This result could be achieved without adding the logic into the procedure by using a SELECT FIRST query. The procedure is used to create a convenient example.) However, the bug contained in the debugger_tutorial system procedure results in its failure to return the correct result set.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|