Hi,
I have in a procedure
create procedure x
....
DECLARE temp_cursor CURSOR WITH HOLD WITH RETURN TO CLIENT FOR
SELECT v_UNIQUEID
FROM SYSIBM.SYSDUMMY1;
insert into y
select from .......;
values IDENTITY_VAL_LOCAL() INTO v_UNIQUEID;
(IDENTITY_VAL_LOCAL() is the identity from y table)
...
open temp_cursor;
end;
the value for IDENTITY_VAL_LOCAL() is NULL.
Can you explain me why ?
In SQL Server you can use the print command to see the value for an parameter. What can be used in DB2?
Thanks
I have in a procedure
create procedure x
....
DECLARE temp_cursor CURSOR WITH HOLD WITH RETURN TO CLIENT FOR
SELECT v_UNIQUEID
FROM SYSIBM.SYSDUMMY1;
insert into y
select from .......;
values IDENTITY_VAL_LOCAL() INTO v_UNIQUEID;
(IDENTITY_VAL_LOCAL() is the identity from y table)
...
open temp_cursor;
end;
the value for IDENTITY_VAL_LOCAL() is NULL.
Can you explain me why ?
In SQL Server you can use the print command to see the value for an parameter. What can be used in DB2?
Thanks