Icon SET STATUS MESSAGE

Creates a new status message.

Syntax
SET STATUS MESSAGE TO <Message>

Usage
Use this statement to create a new status message that can be retrieved and viewed by the application that is executing the current routine. The message can be any text that you wish.

Examples
-- This procedure uses a SET STATUS MESSAGE
-- statement to display which rows are updated

CREATE PROCEDURE UpdateState()
BEGIN
   DECLARE CustCursor CURSOR WITH RETURN FOR Stmt;
   DECLARE CustNo INTEGER DEFAULT 0;
   DECLARE State CHAR(2) DEFAULT '';

   PREPARE Stmt FROM 'SELECT * FROM Customer';

   OPEN CustCursor;

   START TRANSACTION ON TABLES 'Customer';
   BEGIN

      FETCH FIRST FROM CustCursor ('State') INTO State;

      WHILE NOT EOF(CustCursor) DO
         IF (State='FL') THEN
            UPDATE CustCursor SET 'State'='NY';
            FETCH FROM CustCursor ('CustNo') INTO CustNo;
            SET STATUS MESSAGE TO 'Customer # '+
                            CAST(CustNo AS VARCHAR)+' updated';
         END IF;
         FETCH NEXT FROM CustCursor ('State') INTO State;
      END WHILE;

      COMMIT;

   EXCEPTION
      ROLLBACK;
   END;
END

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis SQL statement is an ElevateDB extension.
Image