Calling external libraries from procedures
268
Using SELECT statements in batches
You can include one or more SELECT statements in a batch. Multiple SELECT
statements are allowed by Interactive SQL only if they return the same number
of columns and each column has the same data type.
The following is a valid batch:
IF EXISTS(SELECT *
FROM systable
WHERE table_name=’employee’ )
THEN
SELECTemp_lname AS LastName,
emp_fname AS FirstName
FROM employee;
SELECT lname, fname
FROM customer;
SELECT last_name, first_name
FROM contact;
END IF
The alias for the result set is required only in the first SELECT statement, as
the server uses the first SELECT statement in the batch to describe the result
set.
A RESUME statement is required following each query to retrieve the next
result set.
The following is not a valid batch, as the two queries return different result sets:
IF EXISTS( SELECT * FROM systable
WHERE table_name=’employee’ )
THEN
SELECTemp_lname AS LastName,
emp_fname AS FirstName
FROM employee;
SELECT id, lname, fname
FROM customer;
END IF
Calling external libraries from procedures
You can call a function in an external Dynamic Link Library (DLL) from a
stored procedure or user-defined functions under an operating system that
supports DLLs. You cannot use external functions on UNIX.
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 ...