VARIABLE StayWorkflow_Id_max number;
BEGIN
SELECT max(StayWorkflow_Id)+1 into :StayWorkflow_Id_max from MVStayWorkflow;
END;
/
insert into MVStayWorkflow (StayWorkflow_Id, Stay_Id, Passage_Id,
User_Id, RespUnit_Id, Resource_Id, WorkflowAction, CurrentState,
PreviousState, WorkflowTime, UserStamp, TimeStamp)
values (:StayWorkflow_Id_max, 98485, 129844, 1, '', '', 11, 7, 7, to_char(sysdate, 'YYYYMMDD HH:MI:SS'), 1, to_char(sysdate, 'YYYYMMDD HH:MI:SS'));
insert into MVStayWorkflow (StayWorkflow_Id, Stay_Id, Passage_Id,
User_Id, RespUnit_Id, Resource_Id, WorkflowAction, CurrentState,
PreviousState, WorkflowTime, UserStamp, TimeStamp)
values (:StayWorkflow_Id_max+1, 66311, 114593, 1, '', '', 11, 7, 7, to_char(sysdate, 'YYYYMMDD HH:MI:SS'), 1, to_char(sysdate, 'YYYYMMDD HH:MI:SS'));
insert into MVStayWorkflow (StayWorkflow_Id, Stay_Id, Passage_Id,
User_Id, RespUnit_Id, Resource_Id, WorkflowAction, CurrentState,
PreviousState, WorkflowTime, UserStamp, TimeStamp)
values (:StayWorkflow_Id_max+2, 83742, 110157, 1, '', '', 11, 7, 7, to_char(sysdate, 'YYYYMMDD HH:MI:SS'), 1, to_char(sysdate, 'YYYYMMDD HH:MI:SS'));
insert into MVStayWorkflow (StayWorkflow_Id, Stay_Id, Passage_Id,
User_Id, RespUnit_Id, Resource_Id, WorkflowAction, CurrentState,
PreviousState, WorkflowTime, UserStamp, TimeStamp)
values (:StayWorkflow_Id_max+3, 74421, 98685, 1, '', '', 11, 7, 7, to_char(sysdate, 'YYYYMMDD HH:MI:SS'), 1, to_char(sysdate, 'YYYYMMDD HH:MI:SS'));
update SYSQLSequence set nextValue = :StayWorkflow_Id_max+4 where name = '_MVStayWorkflow_auto_';
commit;
Gives me this error:
Error report:
SQL Error: Missing IN or OUT parameter at index:: 1