CHAPTER 6 Using Procedures and Batches
235
To execute a CALL of a procedure that returns a result set, DBISQL opens a
cursor.
The cursor is left open after the CALL in case a second result set is returned.
The DBISQL statistics window displays the plan of the SELECT query in the
procedure and then displays the line:
Procedure is executing. Use RESUME to continue.
You need to execute the
RESUME
statement or the DBISQL
CLEAR
command
from the DBISQL Command window before you can alter or drop the
procedure.
For more information about using cursors in procedures, see “Using cursors
in procedures” on page 251
Introduction to user-defined functions
User-defined functions are a class of procedures that return a single value to the
calling environment. This section introduces creating, using, and dropping
user-defined functions.
Creating user-defined functions
User-defined functions are created using the
CREATE FUNCTION
statement.
You must have RESOURCE authority in order to create a user-defined
function.
The following simple example creates a function that concatenates two strings,
together with a space, to form a full name from a first name and a last name.
You can create the example function
fullname
by connecting to the sample
database from DBISQL as user ID DBA, using password SQL, and typing the
statement in the command window.
243 72995.000
247 48023.690
Employee ID
Salary
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 ...