Skip to Content
0
Jan 29, 2018 at 05:16 AM

HOW TO USE NULL IN ELSE PART IN SAP HANA?

262 Views Last edit Jan 29, 2018 at 05:37 AM 3 rev

Hi Experts,

I have a requirement to use null in else part of if condition.

Code:

CREATE PROCEDURE "KABIL_PRACTICE"."PROC_ELSE_NULL"(IN VAL1 INTEGER)
AS
BEGIN
IF :VAL1 >= 5 and :VAL1 <= 10
THEN
INSERT INTO "KABIL_PRACTICE"."ELSE_NULL" VALUES (:VAL1);
ELSE
NULL;
END;

but the above code throws an error in null line.

any suggestions please..??