> Does anyone have any insight in to this? > > Running this statement in isql: > > EXECUTE PROCEDURE P_IMPORT; > > Yields this error: > > Statement failed, SQLCODE = -508 > no current record for fetch operation > -violation of PRIMARY or UNIQUE KEY constraint > > Yet running the same statement in Database Workbench yields no error. > The procedure is written to ignore unique_key_violation: > > FOR SELECT > COL1, COL2 , ... > FROM > P_SELECT > INTO > :COL1, :COL2, ... > DO BEGIN > > INSERT INTO > THE_TABLE ( > COL1, COL2, ... > ) > VALUES ( > :COL1, :COL2, ... > ); > > WHEN GDSCODE unique_key_violation DO COL_1=NULL;
Are you sure that isql sees the most recent version of the SP, in case you are developing/changing the SP in DBW? Thomas
