This example extends the preceding example, Simple External Stored Procedure, by calling the FNC_CallSP library function to call the addRegion stored procedure. The external stored procedure strips off the first four characters of the region input argument and passes the result to the addRegion stored procedure, which inserts the string into the regionTable table.
The addRegion stored procedure is defined like this:
CREATE PROCEDURE addRegion (IN region VARCHAR(64), OUT region_count INTEGER) BEGIN INSERT INTO regionTable VALUES (:region); SEL COUNT(*) INTO :region_count FROM regionTable; END;
The regionTable table is defined like this:
CREATE TABLE regionTable (region VARCHAR(64));