CHAPTER 6 Using Procedures and Batches
267
Verifying procedure input arguments
You can verify that input arguments to a procedure are passed correctly in
several ways.
You can display the value of the parameter on the message window of the
server using the MESSAGE statement. For example, the following procedure
simply displays the value of the input parameter var:
CREATE PROCEDURE message_test (IN var char(40))
BEGIN
MESSAGE var;
END
You can do the following from Interactive SQL:
Create the procedure.
Call the procedure:
CALL MESSAGE_TEST (’Test Message’);
After calling the procedure on a Windows NT system, double click the
server icon in the system tray to ensure that the message was passed
properly to the server.
SELECT GLOBALVAR
Statements allowed in batches
The following statements are not allowed in batches:
•
CONNECT or DISCONNECT statement
•
ALTER PROCEDURE or ALTER FUNCTION statement
•
DBISQL commands such as OUTPUT
Otherwise, any SQL statement is allowed, including data definition statements
such as CREATE TABLE, ALTER TABLE, and so on.
The CREATE PROCEDURE statement is allowed, but must be the final
statement of the batch. Therefore a batch can contain only a single CREATE
PROCEDURE statement.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...