I am getting following error whlie creating cursor.Please help me.
Create procedure Order_Proc()
Declare K INTEGER default 0;
Declare V_TOTAL INTEGER default 0;
Declare v_empno INTEGER;
Declare v_ename Varchar(10);
Declare C1 CURSOR FOR SELECT empno,ename from EMP_1 where empno is not null;
Fetch C1 into v_empno,v_ename;
UPDATE JJ_JMP3_NEW FOSF
WHERE FOSF."ORDER ID"=C2.ORDER_ID AND FOSF."AGENCY" <> ‘SELFPROV-SELF PROVISIONING VIDEO REMOTE’;
IF( K>1000) THEN
INSERT INTO ODS.VID_IS_ACTV_LOG VALUES (SYSDATE,V_TOTAL);
SPL1048:E(L14), Unexpected text 'V_TOTAL' in place of SPL statement.
SPL1008:E(L14), Unexpected text 'V_TOTAL' in place of literal or system variable.
SPL1027:E(L15), Missing/Invalid SQL statement'E(3707):Syntax error, expected something like ';' between a name or a Unicode delimited identifier and the word 'V_TOTAL'.'.