Previous Topic Next topic Print topic


Testing a TSQL Stored Procedure Query

Once you have built the TSQL stored procedure query, you can test it in much the same manner as you test other queries. However, because multiple SQL statements are created by OpenESQL Assistant for a stored procedure, you need to run the query multiple times. Each time you run the query, you execute the next SQL statement.

The first time you run the query, the DROP PROCEDURE statement is executed, and the following message appears:

Cannot drop the procedure 'spname,' because it does not exist...

This message is expected and will change if you execute the DROP PROCEDURE multiple times.

The second time you run the query, the CREATE PROCEDURE statement is executed. A message appears indicating that the statement executed successfully.

To execute a stored procedure CALL statement with search criteria that requires you to provide a literal value, you are prompted to provide that literal value.

When all SQL statements have been executed, OpenESQL shows the results on the Results tab.

You can repeat this process until you are satisfied with the results.

Previous Topic Next topic Print topic