set serveroutput on
DECLARE
v_PipeName VARCHAR2(30) := 'MyPipe';
v_Status INTEGER;
v_DateVal DATE;
v_NumberVal NUMBER;
v_StringVal VARCHAR2(100);
BEGIN
v_Status := DBMS_PIPE.RECEIVE_MESSAGE(v_PipeName);
IF v_Status != 0 THEN
DBMS_OUTPUT.PUT_LINE('Error ' || v_Status ||
' while receiving message');
END IF;
DBMS_PIPE.UNPACK_MESSAGE(v_DateVal);
DBMS_PIPE.UNPACK_MESSAGE(v_NumberVal);
DBMS_PIPE.UNPACK_MESSAGE(v_StringVal);
DBMS_OUTPUT.PUT_LINE('Unpacked ' || v_DateVal);
DBMS_OUTPUT.PUT_LINE('Unpacked ' || v_NumberVal);
DBMS_OUTPUT.PUT_LINE('Unpacked ' || v_StringVal);
END;
/
--
|