I'm creating a variable and checking if the variable matches then update a table but it is not working
tried a replacement of insert into instead of update, but update suits my requirement
CREATE OR REPLACE PROCEDURE "SP1" AS
V1 INT;
V2 INT;
BEGIN
SELECT SUM(SALES)
INTO V1
FROM "TABLE_A";
SELECT SUM(SALES)
INTO V2
FROM "TABLE_B";
IF V1=V2
THEN
UPDATE "TABLE_C"
SET "COLUMN_1"=1;
END IF
END "SP1";
In the above code,"COLUMN_1" of "TABLE_C" should be set to 1 where it is not happening