In the following example, a message is received and the in-reply-to-id of the message is output to the database server messages
window:
begin
declare @msgid varchar(128);
declare @inreplytoid varchar(128);
set @msgid = ml_qa_getmessage( 'myaddress' );
set @inreplytoid = ml_qa_getinreplytoid( @msgid );
message 'message is likely a reply to the message with id ' || @inreplytoid;
commit;
end