I created a sql file to create a Procedure, and it was successfully created.
I created a sql file to execute the procedure, and it did without any errors, but i dont see the data been updated.
The Execute procedure.sql script is:
BEGIN
set serveroutput on size 1000000
execute zx01211.PDAC_UPDATE_ALLOW_DENY_SERV;
END;
I tried with '/' at the end of the script, and i am got this error;
Enter password:
set serveroutput on size 1000000
*
ERROR at line 2:
ORA-06550: line 2, column 5:
PL/SQL: ORA-00922: missing or invalid option
ORA-06550: line 2, column 1:
PL/SQL: SQL Statement ignored
Also in the script, line
BEGIN
set serveroutput on size 1000000
execute zx01211.PDAC_UPDATE_ALLOW_DENY_SERV;
END;
/
i have used "Schema name.procedure name".
BEGIN
set serveroutput on size 1000000
execute zx01211.PDAC_UPDATE_ALLOW_DENY_SERV;
END;
/
Is it the right way to use in the .sql script to execute the procedure?
Is it possible to add "Execute procedure" script in my current existing "Create or Replace Procedure script".
I would like this to work simultaneously "create and execute the procedure"
The script to create procedure is;
CREATE OR REPLACE PROCEDURE PDAC_UPDATE_ALLOW_DENY_SERV
IS
tmpVar NUMBER;
/******************************************************************************
NAME: UPDATE_ALLOW_DENY_SERV
PURPOSE:
REVISIONS:
Ver Date Author Description
--------- ---------- --------------- ------------------------------------
1.0 11/29/2010 Mohamed.S.Rahman 1. Created this procedure.
NOTES:
Automatically available Auto Replace Keywords:
Object Name: UPDATE_ALLOW_DENY_SERV
Sysdate: 11/29/2010
Date and Time: 11/29/2010, 11:14:18 AM, and 11/29/2010 11:14:18 AM
Username: rsa11355 (set in TOAD Options, Procedure Editor)
Table Name: (set in the "New PL/SQL Object" dialog)
******************************************************************************/
BEGIN
tmpVar := 0;
UPDATE DMERCLINE
SET allow_serv = allow_serv / 1000
WHERE sadmerc_receipt_dt BETWEEN TO_DATE ('06-Oct-09')
AND TO_DATE ('30-Jun-10');
UPDATE DMERCLINE
SET deny_serv = deny_serv / 1000
WHERE sadmerc_receipt_dt BETWEEN TO_DATE ('06-Oct-09')
AND TO_DATE ('30-Jun-10');
END PDAC_UPDATE_ALLOW_DENY_SERV;
/