Hi,
I have this procedure
CREATE PROCEDURE t (
IN PUSERID INTEGER,
IN PDATE TIMESTAMP,
, OUT PSQLCODE INTEGER)
RESULT SETS 0 LANGUAGE SQL
BEGIN NOT ATOMIC
DECLARE SQLCODE INT;
DECLARE CONTINUE HANDLER FOR NOT FOUND
SET AT_END = 1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SET PSQLCODE = SQLCODE;
SET PSQLCODE = 0;
update b
set value=bvalue
where userid=puserid
and date=pdate;
commit;
end;
When I execute this procedure it is failling with SQLCODE=0.
If I execute only the update statement it is ok. Why in procedure is not executed and is finished with SQLCODE exit number?
In my table I have 2.500.000 records.
Thanks.
I have this procedure
CREATE PROCEDURE t (
IN PUSERID INTEGER,
IN PDATE TIMESTAMP,
, OUT PSQLCODE INTEGER)
RESULT SETS 0 LANGUAGE SQL
BEGIN NOT ATOMIC
DECLARE SQLCODE INT;
DECLARE CONTINUE HANDLER FOR NOT FOUND
SET AT_END = 1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SET PSQLCODE = SQLCODE;
SET PSQLCODE = 0;
update b
set value=bvalue
where userid=puserid
and date=pdate;
commit;
end;
When I execute this procedure it is failling with SQLCODE=0.
If I execute only the update statement it is ok. Why in procedure is not executed and is finished with SQLCODE exit number?
In my table I have 2.500.000 records.
Thanks.