In the following example, a message is received and the content is output to the database server messages window:
begin
declare @msgid varchar(128);
declare @contentclass integer;
set @msgid = ml_qa_getmessage( 'myaddress' );
set @contentclass = ml_qa_getcontentclass( @msgid );
if @contentclass = 1 then
message 'message binary is ' || ml_qa_getbinarycontent( @msgid );
elseif @contentclass = 2 then
message 'message text is ' || ml_qa_gettextcontent( @msgid );
end if;
commit;
end