Hi All,
How can I get the nextVal from a sequence into a variable. I have tried using :
set (var) = (select (nextval for mySequence) from sysibm.sysdummy1);
but I get an error saying
"NEXTVAL FOR mySequence" cannot be specified in this context.
I also tried
SELECT (NEXTVAL FOR mySequence) into v_var from sysibm.sysdummy1;
but got an error saying
An unexpected token "var" was found following "mySequence) into". Expected tokens may include: "<space>"
Where am I going wrong? Is there any other method?
Thanks
Deepak
