Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

sql_error_message is null for error_code:1299

$
0
0

SQL_ERROR_MESSAGE shows error message for most of the cases but its NULL for the error code : 1299 - no data found

 

DROP PROCEDURE TEST_EXCEPTION;

 

CREATE PROCEDURE TEST_EXCEPTION ()

LANGUAGE SQLSCRIPT

AS

BEGIN

 

     DECLARE VAR_TEMP VARCHAR(10);

     DECLARE EXIT HANDLER FOR SQLEXCEPTION

     BEGIN

            SELECT ::SQL_ERROR_CODE,::SQL_ERROR_MESSAGE FROM DUMMY;

     END;

 

     --INSERT INTO "TEJA"."USERS" VALUES ('U_USER1','UNION'); --shows the error message (primary key violation)

     --SELECT 1/0 FROM DUMMY;   --shows the error message

     SELECT VALUELESS INTO VAR_TEMP FROM "TEJA"."TEMP10" WHERE VALUELESS = 'DIVI';

 

END;

 

hana.png


Viewing all articles
Browse latest Browse all 6412

Trending Articles