Home > database >  DB2 function to generate serial number error, please solve
DB2 function to generate serial number error, please solve

Time:10-06

The original SQL: select (Nextval for SCF. SEQ_GS_COMMON) from sysibm. Either
Mass production serial number, now need to write SQL to DB2 function, in the stored procedure function
WHILE getcount & lt;> 0 DO
The SET QSEQREL=(
SELECT (Nextval for SCF. SEQ_GS_COMMON) FROM sysibm. Either
);
The SET QSELIST=QSELIST | | ', '| | QSEQREL;
END the WHILE;
Cycle time:
SQL error [428 f9] : "NEXTVAL FOR SCF. SEQ_GS_COMMON" always be specified in this context, the. SQLCODE=- 348, SQLSTATE=428 f9, DRIVER=4.16.53
"NEXTVAL FOR SCF. SEQ_GS_COMMON" always be specified in this context, the. SQLCODE=- 348, SQLSTATE=428 f9, DRIVER=4.16.53
Seek the solution??
Change cycle to the following is not an error
WHILE getcount & lt;> 0 DO
SELECT (Nextval for SCF. SEQ_GS_COMMON) FROM sysibm. Either
END the WHILE;
How can I go back to select the serial number?

CodePudding user response:

Beg ace answer ah,
  •  Tags:  
  • DB2
  • Related