I have a SQL function that monitors for a warning condition. I need it to
relay that warning to the caller. It catches the warning fine, but I can't
get it to relay. The caller gets the NULL but not the SQLSTATE and message
text. I've tried RESIGNAL and SIGNAL.
DECLARE EXIT HANDLER for SQLWARNING
BEGIN
-- Neither RESIGNAL or SIGNAL seems to work.
--RESIGNAL;
--GET DIAGNOSTICS CONDITION 1
-- v_state = RETURNED_SQLSTATE,
-- v_msg = DB2_ORDINAL_TOKEN_4;
--signal sqlstate v_state
-- set message_text = v_msg ;
RETURN null ;
END ;
Any suggestions?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.