plan work procedure sotre with PLS-00103
Hi friends,
I have create a schedule the job to run a procedure in oracle 11.1... I got an error when I run the job. It is a daily work
SQL > start
2 dbms_scheduler.run_job ('test', TRUE);
3 end;
4.
Start
*
ERROR on line 1:
ORA-06550: line 1, column 765:
PLS-00103: encountered the symbol "TEST_PERSON" when awaits an of the
Next:
:= . (@ %; immediate)
The symbol ': = ' was replaced by 'TEST_PERSON' continue.
ORA-06512: at "SYS." DBMS_ISCHED", line 185
ORA-06512: at "SYS." DBMS_SCHEDULER", line 486
ORA-06512: at line 2
as labour code
Start
DBMS_SCHEDULER. () CREATE_JOB
job_name = > 'test ',.
job_type = > 'PLSQL_BLOCK ',.
job_action = > ' start RUN TEST_PERSON(); end;',
start_date = > TRUNC (SYSDATE) + 23/24.
repeat_interval = > ' FREQ = daily; RANGE = 30',
/ next night at 23:00 * /.
"Comments = > ' explicit LOCKING");
END;
I can successfully run RUN TEST_PERSON(); sqlplus and works well. What is wrong setting in DBMS_SCHEDULER?
Help thanks in advance
newdba
EXECUTE is a SQL * Plus command. Omit of in your PL/SQL block.
job_action => ' begin TEST_PERSON; end;',
Tags: Database
Similar Questions
-
Execution of procedure error: ORA-06550 and PLS-00103
Hi, I created the stored procedure as,
And here is the code I am trying to run:CREATE OR REPLACE PACKAGE BODY APPS.TMP_IMPORT_ITEMS_PKG AS PROCEDURE LOAD_INTERFACE_TABLE(organization_code IN VARCHAR2, errbuf OUT VARCHAR2, retcode OUT NUMBER) IS org_code varchar2(3); BEGIN org_code:= organization_code; DBMS_OUTPUT.PUT_LINE('Organization Code is...' || org_code); END LOAD_TABLE; END TMP_IMPORT_ITEMS_PKG;
When I run the above code, I get the following error:DECLARE V_ERRBUF VARCHAR2(1000); V_RETCODE NUMBER; BEGIN EXEC TMP_IMPORT_ITEMS_PKG.LOAD_INTERFACE_TABLE('x1', V_ERRBUF, V_RETCODE); END;
ORA-06550: line 5, column 10:
PLS-00103: encountered the symbol "TMP_IMPORT_ITEMS_PKG" during the expected in the following way:
:= . ( @ % ;
The symbol ': = ' was replaced by 'TMP_IMPORT_ITEMS_PKG' continue.
Can any body tell me what is the problem with the above code
Thanks in advance,
Kumar K
Published by: user2054206 on December 17, 2008 21:09
Published by: user2054206 on December 17, 2008 21:27Hello
In PL/SQL, you cannot call the procedure like exec... in sql, you can call exec
but in PL/SQL, you can call as follows. DECLARE
V_ERRBUF VARCHAR2 (1000);
NUMBER OF V_RETCODE;
BEGIN
TMP_IMPORT_ITEMS_PKG. LOAD_INTERFACE_TABLE ('x 1', V_ERRBUF, V_RETCODE);
END;I hope this works.
-
Hello
I get the following error when I try to compile the procedure. I call a package inside this simple procedure. Not sure where I do worng. Here is the error I get.
Error (34.2): PLS-00103: encountered the symbol "END"?
Here is my code
create or replace PROCEDURE BATCH_JOB_CAC_SP
(
vstatus OUT NUMBER)
AS
vloadserver global_name.global_name%TYPE: = get_dbservername;
vuseridmod CONSTANT VARCHAR2 (15): = 'SYSTEM '.
vloadname CONSTANT VARCHAR2 (30): = "BATCH_JOB_CAC_SP";
v_cnt_upd NUMBER: = 0;
vrunid NUMBER;
v_spoutput VARCHAR2 (150);
CURSOR job_cac
IS
SELECT NumCli, job_cac FROM batch_job_cac, batch_recid, jobnum;
BEGIN
I'm in job_cac LOOP
job_cac_pkg.job_cac_valid_sp (i.custnum, i.jobnum, v_spoutput);
CASE v_spoutput
WHEN "1" THEN DBMS_OUTPUT. Put_line ('update job ACC');
WHEN "2" THEN DBMS_OUTPUT. Put_line ('update job ACC');
WHEN '3' THEN DBMS_OUTPUT. Put_line ('can not update working ACC');
OF ANOTHER DBMS_OUTPUT. Put_line (v_spoutput);
END CASE;
END LOOP;
EXCEPTION
WHILE OTHERS THEN
IF job_cac % isopen THEN
CLOSE Job_cac;
END IF;
ROLLBACK;
vStatus: = 1;
LOG_ERROR_SP_NM (vLoadServer, vLoadName, SQLCODE, SQLERRM, vUserIdMod);
END;
END BATCH_JOB_CAC_SP;
Thanks for your help.
Hello
You have 2 statements END at the bottom of your code, but only 1 BEGIN statement earlier.
Losing one of these END States.
-
Why I got error PLS-00103 for this procedure?
Hey, guys:
I have a question about the syntax of the exception, I want to record the number of rows from the tables, but if there is no such thing as a table, my program must be able to continue the loop.
I'm your only syntax error:create or replace procedure check_rows as cursor t1 is select table_name from all_csv where table_built='Y' and table_name is not null; match_count1 INTEGER; begin for n in t1 loop dbms_output.put_line(n.table_name); EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || n.table_name INTO match_count1 ; update all_csv set total_rows=match_count1 where table_name=n.table_name; exception when table_does_not_exist then null end; end loop; commit; end;
PLS-00103: encountered the symbol "EXCEPTION" when expected
of the following:
begin case declare end exit for goto if loop mod null pragma
raise return select update while < ID >
< between double quote delimited identifiers of > < a variable binding > < <
Close current delete fetch locking insert open rollback
SAVEPOINT SQLExecute set pipe fusion commit forall
Could someone give me a hint?
Thank you very much!
SamEXCEPTION clause should be at the end of the BEGIN block. It cannot start in the middle of the lock begin body:
create or replace procedure check_rows as cursor t1 is select table_name from all_csv where table_built='Y' and table_name is not null; match_count1 INTEGER; begin for n in t1 loop begin dbms_output.put_line(n.table_name); EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || n.table_name INTO match_count1; update all_csv set total_rows = match_count1 where table_name = n.table_name; exception when table_does_not_exist then null; end; end loop; commit; end; /
And it is not a good idea to engage in the stored procedure. But the main question here is table_does_not_exist exception because it is not declared in your code. You must declare it and use PRAGMA EXCEPTION_INIT to connect with the desired error code.
SY.
-
Try to run the procedure and get an error PLS-00103
I have a procedure defined with these parameters
create or replace PROCEDURE procAuth
(
EMAIL IN VARCHAR2,
PASSWORD IN VARCHAR2,
IP IN VARCHAR2,
UL NUMBER
)
Using this code
var x number
procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1': x);
print x
gives me
Error at startup on line 2 of the command:
procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1': x);
Error report:
ORA-06550: line 1, column 65:
PLS-00103: encountered the symbol "" when expecting one of the following values:
. ( ) , * @ % & | = + - <>/ at is mod not rank rem = >
.. < an exponent (*) > <>or! = or ~ = > = < = <>and or as
between |
The symbol ',' was replaced by ' ' to continue.
06550 00000 - "line %s, column % s:\n%s".
* Cause: Usually a PL/SQL compilation error.
* Action:
x
------
Thanks for any helpjerry8989 wrote:
I have a procedure defined with these parameterscreate or replace PROCEDURE procAuth
(
EMAIL IN VARCHAR2,
PASSWORD IN VARCHAR2,
IP IN VARCHAR2,
UL NUMBER
)Using this code
var x number
exec procAuth (' [email protected]', '555555',' 1.1.1.1': x);
print xgives me
Error at startup on line 2 of the command:
exec procAuth (' [email protected]', '555555',' 1.1.1.1': x);a comma is perhaps missing to the right of the right like apostrophe below?
procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1',: x);
-
Error PLS-00103 stored procedure: encountered the symbol «/»
HelloI'm trying this on Oracle 11 g on Centos 6.2 Express
Summer make mistakeERROR on line 1:
ORA-06550: line 1, column 7:
PLS-00103: encountered the symbol "/" when expecting one of the following values:
..
ERROR on line 1:
ORA-06550: line 1, column 7:
PLS-00103: encountered the symbol "/" when expecting one of the following values:For the following procedure, can someone help me?
CREATE OR REPLACE PROCEDURE bulkInsert()
AS
BEGIN
FOR x IN 1.100
LOOP
INSERT INTO arrested
(order_id, order_name, order_status)
VALUES
(x, 'Fish', 'Y');
END LOOP;
COMMIT;
END bulkInsert;
/concerning
Sameer44849b9b-03d8-4edd-bb18-e7f3e4fa4c6d wrote:
Creates a file named bulkoracleinput and I'm running to help run
/filename. If you want to run a SQL Script file in SQL more then you need to use the command @ and not the command EXECUTE.
Try like this
@
/filename. -
PLS-00103: received the error on the create procedure
Dear all,
I created the view during this procedure, I got error.
1 PLS-00103: encountered the symbol "=" when expecting one of the following conditions:
constant exception < an ID >
< a between double quote delimited identifiers > double Ref table Fedya
timestam tank time
2 PLS-00103: encountered the symbol "SELECT" at the expected in the following way:
(- + new case mod not null other < an ID >)
< between double quote delimited identifiers of > < a variable binding > avg
3 PLS-00103: encountered the symbol ")" when expecting one of the following values:
. (* @ % & -+; / TA for rem rest mod)
< an exhibitor > (*) and or group having less cross order
Start uni
create or replace PROCEDURE PO_ITEM_BRANCH_PROC (ITEM_ID1 in NUMBER, BRANCH_CODE1 IN VARCHAR2, RESULT1 ON NUMBER, ERR_MSG OUT NVARCHAR2)
as
PERFORMANCE(1): = 0;
BEGIN
SELECT
Count (a.asset_number) in RESULT1
Of
FA_ADDITIONS HAS
C FA_CATEGORIES_VL
, FA_BOOKS B
FA_LOCATIONS FL
FA_DISTRIBUTION_HISTORY DH
FA_TRANSACTION_HEADERS TH
WHERE
A.ASSET_CATEGORY_ID = C.CATEGORY_ID
AND A.ASSET_ID = B.ASSET_ID
AND A.ASSET_ID = TH. ASSET_ID
AND TH. TRANSACTION_TYPE_CODE = "ADD."
AND B.TRANSACTION_HEADER_ID_IN = TH. TRANSACTION_HEADER_ID
AND B.ASSET_ID = TH. ASSET_ID
AND A.ASSET_ID = DH. ASSET_ID
AND DH. LOCATION_ID = FL. LOCATION_ID
AND TH. TRANSACTION_TYPE_CODE = "ADD."
- AND IN FLORIDA. SEGMENT4 = 'Shalimar Campus, Lahore.
AND TH. TRANSACTION_TYPE_CODE <>"FULL PENSION".
- AND IN FLORIDA. SEGMENT4 = (SELECT flex_value FROM fnd_flex_values WHERE attribut1 = '04010303')
AND A.ASSET_CATEGORY_ID IN)
SELECT
MSI.asset_category_id
Of
b po_requisition_lines_all,
MSI mtl_system_items_b
WHERE
b.ITEM_ID = msi. INVENTORY_ITEM_ID
AND msi.inventory_item_id (+) = B.item_id
AND msi.organization_id (+) = B.destination_organization_id
AND ITEM_ID = b.item_id
)
AND IN FLORIDA. SEGMENT4 =)
SELECT
(SELECT FLEX_VALUE FROM fnd_flex_values WHERE attribut1 = B.ATTRIBUTE2) GENERAL MANAGEMENT OF THE
Of
b po_requisition_lines_all,
MSI mtl_system_items_b
WHERE
b.ITEM_ID = msi. INVENTORY_ITEM_ID
AND msi.inventory_item_id (+) = B.item_id
AND msi.organization_id (+) = B.destination_organization_id
AND b.ATTRIBUTE2 = BRANCH_CODE
)
;
exception when others then
Mesg: = 'select failed in BILLTER.
err_msg: = mesg;
END;create or replace PROCEDURE PO_ITEM_BRANCH_PROC(ITEM_ID1 IN NUMBER, BRANCH_CODE1 IN VARCHAR2, RESULT1 OUT NUMBER, ERR_MSG OUT NVARCHAR2 ) as BEGIN RESULT1 := 0 ; SELECT count(a.asset_number) into RESULT1 FROM FA_ADDITIONS A, FA_CATEGORIES_VL C, FA_BOOKS B, FA_LOCATIONS FL, FA_DISTRIBUTION_HISTORY DH, FA_TRANSACTION_HEADERS TH WHERE A.ASSET_CATEGORY_ID = C.CATEGORY_ID AND A.ASSET_ID = B.ASSET_ID AND A.ASSET_ID = TH.ASSET_ID AND TH.TRANSACTION_TYPE_CODE = 'ADDITION' AND B.TRANSACTION_HEADER_ID_IN = TH.TRANSACTION_HEADER_ID AND B.ASSET_ID = TH.ASSET_ID AND A.ASSET_ID = DH.ASSET_ID AND DH.LOCATION_ID = FL.LOCATION_ID AND TH.TRANSACTION_TYPE_CODE = 'ADDITION' -- AND FL.SEGMENT4 = 'Shalimar Campus Lahore' AND TH.TRANSACTION_TYPE_CODE != 'FULL RETIREMENT' -- AND FL.SEGMENT4 = (SELECT flex_value FROM fnd_flex_values WHERE ATTRIBUTE1 = '04010303') AND A.ASSET_CATEGORY_ID IN (SELECT msi.asset_category_id FROM po_requisition_lines_all b, mtl_system_items_b msi WHERE b.ITEM_ID = msi.INVENTORY_ITEM_ID AND msi.inventory_item_id(+) = B.item_id AND msi.organization_id(+) = B.destination_organization_id AND b.item_id = ITEM_ID ) AND FL.SEGMENT4 = (SELECT (SELECT FLEX_VALUE FROM fnd_flex_values WHERE ATTRIBUTE1 = B.ATTRIBUTE2 ) BRANCH FROM po_requisition_lines_all b, mtl_system_items_b msi WHERE b.ITEM_ID = msi.INVENTORY_ITEM_ID AND msi.inventory_item_id(+) = B.item_id AND msi.organization_id(+) = B.destination_organization_id AND b.ATTRIBUTE2 = BRANCH_CODE ); exception when others then err_msg := 'select failed in BILLTER'; END ;
Concerning
Etbin
Edited by: Etbin on 21.4.2012 11:26
SorryEdited by: Etbin on 21.4.2012 12:02
reposted -
ORA-06550: line 1, column 34: PLS-00103 in Validation element with 4 APEX
Hello
I use 4 APEX?
I created ths program to validate an element
DECLARE
LONGEUR1 NUMBER;
BEGIN
Select the LENGTH IN LONGEUR1 OF the BOOK WHERE code_ouvrage = (select code_ouvrage from the book where language =: P6_CODE_OUVRAGE);
IF: P6_PK < 0 or: P6_PK > LONGEUR1 THEN
RETURN FALSE;
ON THE OTHER
RETURN TRUE;
END IF;
END;
I had thir error message when you run the page:
ORA-06550: line 1, column 34: PLS-00103: symbol "DECLARE" met instead of one of the following symbols: () - + new case mod not null to other table avg current County exists max min prior sql stddev sum variance run the two main merger year forall multiset months DAY_ hour minute second stimezone_minute timezone_region timezone_abbr time end date interval timestamp timezone_hour
ERR-1025 expression PLSQL treatment error. DECLARE LONGEUR1 NUMBER; START LENGTH Select INTO LONGEUR1 FROM BOOK WHERE code_ouvrage = (select code_ouvrage from the book where language =: P6_CODE_OUVRAGE); IF: P6_PK < 0 or: P6_PK > LONGEUR1 THEN RETURN FALSE; ELSE RETURN TRUE; END IF; END;
All siggestion please?Rob wrote:
Hello
I use 4 APEX?
I created ths program to validate an element
DECLARE
LONGEUR1 NUMBER;
BEGIN
Select the LENGTH IN LONGEUR1 OF the BOOK WHERE code_ouvrage = (select code_ouvrage from the book where language =: P6_CODE_OUVRAGE);
IF: P6_PK < 0="" or="" :p6_pk=""> LONGEUR1 THEN
RETURN FALSE;
ON THE OTHER
RETURN TRUE;
END IF;
END;I had thir error message when you run the page:
ORA-06550: line 1, column 34: PLS-00103: symbol "DECLARE" met instead of one of the following symbols: () - + new case mod not null to other table avg current County exists max min prior sql stddev sum variance run the two main merger year forall multiset months DAY_ hour minute second stimezone_minute timezone_region timezone_abbr time end date interval timestamp timezone_hourERR-1025 expression PLSQL treatment error. DECLARE LONGEUR1 NUMBER; START LENGTH Select INTO LONGEUR1 FROM BOOK WHERE code_ouvrage = (select code_ouvrage from the book where language =: P6_CODE_OUVRAGE); IF: P6_PK < 0="" or="" :p6_pk=""> LONGEUR1 THEN RETURN FALSE; ELSE RETURN TRUE; END IF; END;
All siggestion please?
What is the Validation Type? It seems you are trying to use the code for validation of Boolean function return in one of type PL/SQL Expression.
Make sure that the Validation Type is function to return a Boolean.
-
Error PLS-00103 and the program has stopped responding
Hey all, I am currently practical with pl/sql, I am a beginner trying to pl/sql self-training, I use the HR schema that accompanies the express edition of oracle 10g for practice, here is my code:
-- -------------------------------------------------------------------------------------------
FUNCTION to CREATE or REPLACE checkIfSalaryExceedMin (currentJobID in NUMBER, currentProposedSalary number)
RETURN BOOLEAN IS
minSalary NUMBER: = 0;
Begin
Select j.min_salary FROM minSalary of JOB j where j.job_id = currentJobID;
RETURN currentProposedSalary > minSalary;
End checkIfSalaryExceedMin;
-- -------------------------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
FUNCTION to CREATE or REPLACE checkForJobChange (currentEmpID in NUMBER, currentEmpStartDate IN DATE)
RETURN BOOLEAN IS
CURSOR emp_date_id_list1 IS (Select j1.start_date, e1.employee_id JOB_HISTORY j1 EMPLOYEES JOIN e1 ON j1.employee_id = e1.employee_id);
checkVal NUMBER: = 0;
Begin
For em1 IN LOOP emp_date_id_list1
IF (currentEmpID = em1.employee_id AND currentEmpStartDate! = em1.start_date) THEN
checkVal: = 1;
END IF;
END LOOP;
IF checkVal = 1 THEN
RETURN TRUE;
ELSIF checkVal = 0 THEN
RETURN FALSE;
END IF;
End checkForJobChange;
-- -------------------------------------------------------------------------------------------
-- ===================MAIN====================
Declare
CURSOR emp_date_id_list IS (Select j.start_date, e.employee_id, e.job_id, e.salary JOB_HISTORY e j EMPLOYEES JOIN ON j.employee_id = e.employee_id);
Begin
For em IN emp_date_id_list LOOP
IF (em.start_date < TO_DATE ('1990-01-01', 'YYYY-MM-DD')) THEN
IF (checkForJobChange (em.employee_id, em.start_date)) THEN
IF checkIfSalaryExceedMin (em.job_id, (e.salary + (e.salary*.20))) THEN
DBMS_OUTPUT. Put_line ('you can increase his salary');
END IF;
END IF;
END IF;
END LOOP;
End;
-- ================END==MAIN==================
What it does is check if the employee worked prior to January 1, 1990, if he had had a change of job and if it fulfills the two conditions, the program checks if its proposed new salary will be larger than his salary manager current, if not he can get a pay raise.
So my problem is I got an error PLS-00103 earlier, after some tweaking my program now is insensitive, what am I doing wrong? :(
Help, please. Thank you.checkIfSalaryExceedMin (currentJobID in NUMBER
Must be:
checkIfSalaryExceedMin (currentJobID in VARCHAR2
or:
checkIfSalaryExceedMin (currentJobID IN employees.job_id%type
Since then job_id is of data type VARCHAR2 and not a NUMBER.
Also
IF checkIfSalaryExceedMin (em.job_id, (e.salary + (e.salary*.20))) THEN
must be:
IF checkIfSalaryExceedMin (em.job_id, (em.salary + (em.salary*.20))) THEN
After some tweaking my program does not
I've been juggling as well and are unaware of any 'unresponsiveness':
SQL> declare 2 cursor emp_date_id_list 3 is 4 select j.start_date 5 , e.employee_id 6 , e.job_id 7 , e.salary 8 from job_history j 9 join employees e 10 on j.employee_id = e.employee_id; 11 begin 12 for em in emp_date_id_list 13 loop 14 if (em.start_date < to_date('1990-01-01', 'YYYY-MM-DD')) 15 then 16 if (checkforjobchange(em.employee_id, em.start_date)) 17 then 18 if checkifsalaryexceedmin(em.job_id, (e.salary + (e.salary * .20))) 19 then 20 dbms_output.put_line('You can raise his salary'); 21 end if; 22 end if; 23 end if; 24 end loop; 25 end; 26 / if checkifsalaryexceedmin(em.job_id, (e.salary + (e.salary * .20))) * ERROR at line 18: ORA-06550: line 18, column 47: PLS-00201: identifier 'E.SALARY' must be declared ORA-06550: line 18, column 9: PL/SQL: Statement ignored SQL> declare 2 cursor emp_date_id_list 3 is 4 select j.start_date 5 , e.employee_id 6 , e.job_id 7 , e.salary 8 from job_history j 9 join employees e 10 on j.employee_id = e.employee_id; 11 begin 12 for em in emp_date_id_list 13 loop 14 if (em.start_date < to_date('1990-01-01', 'YYYY-MM-DD')) 15 then 16 if (checkforjobchange(em.employee_id, em.start_date)) 17 then 18 if checkifsalaryexceedmin(em.job_id, (em.salary + (em.salary * .20))) 19 then 20 dbms_output.put_line('You can raise his salary'); 21 end if; 22 end if; 23 end if; 24 end loop; 25 end; 26 / declare * ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at line 18 SQL> create or replace function checkifsalaryexceedmin(currentjobid in employees.job_id%typ e 2 ,currentproposedsalary in number) 3 return boolean is 4 5 minsalary number := 0; 6 7 begin 8 9 select j.min_salary 10 into minsalary 11 from jobs j 12 where j.job_id = currentjobid; 13 14 return currentproposedsalary > minsalary; 15 16 end checkifsalaryexceedmin; 17 / Function created. SQL> declare 2 cursor emp_date_id_list 3 is 4 select j.start_date 5 , e.employee_id 6 , e.job_id 7 , e.salary 8 from job_history j 9 join employees e 10 on j.employee_id = e.employee_id; 11 begin 12 for em in emp_date_id_list 13 loop 14 if (em.start_date < to_date('1990-01-01', 'YYYY-MM-DD')) 15 then 16 if (checkforjobchange(em.employee_id, em.start_date)) 17 then 18 if checkifsalaryexceedmin(em.job_id, (em.salary + (em.salary * .20))) 19 then 20 dbms_output.put_line('You can raise his salary'); 21 end if; 22 end if; 23 end if; 24 end loop; 25 end; 26 / You can raise his salary You can raise his salary PL/SQL procedure successfully completed.
-
Hey Geeks,
I am trying to execute the procedure from the SQL Developer, but these errors are coming. What can I do wrong here...
Procedure works fine when I run the compilation and debugging mode. But I need to put later in the c# code.
SET serveroutput on;
DECLARE
OutParam1 to SYS_REFCURSOR;
OutParam2 ON Varchar;
BEGIN
/ * Call procedure package * /.
SPAT_QUERY. SP_VALIDATERULES (9, 'BIS2015001', OutParam1, OutParam2);
/ * Display parameters * /.
dbms_output.put_line ('OutParam1: ' |) OutParam2);
END;
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Error report-
ORA-06550: line 3, column 20:
PLS-00103: encountered the symbol "SYS_REFCURSOR" during the expected in the following way:
:= . (@ %; not null default range character)
06550 00000 - "line %s, column % s:\n%s".
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Procedure below:
create or replace PACKAGE SPAT_QUERY of BODY
AS
/ * Declare a global variable to hold the result of the Validation. */
valResult varchar (10);
PROCEDURE SP_VALIDATERULES)
IN_RQST_NUM NUMBER,
IN_CASEID IN VARCHAR,
OUT_REFCURSOR ON SYS_REFCURSOR,
OUT_VAL_RSLT ON VARCHAR
)
AS
p_rc sys_refcursor;
I have NUMBER: = 0;
/ * Logical query - a loop in the Table of RULES based on request NUM * /.
BEGIN
FOR rec IN (SELECT * FROM T_RULES where RQST_NUM = IN_RQST_NUM)
LOOP
i: = i + 1;
SP_GETSECTS (IN_CASEID, rec. LYR_TX, rec. TRGT_TX, rec. EXCPTD_RSLT_CD, p_rc);
OUT_VAL_RSLT: = valResult;
END LOOP;
END SP_VALIDATERULES;
Thank you
Ken
in anonymous block, variables cannot be defined in the form. IN and OUR are not variable parameters type
Change your code to
DECLARE
OutParam1 SYS_REFCURSOR;
OutParam2 Varchar;
-
Try the Advanced installation of new ADR in a clean PDB 12 c (12.1.0.1) installation.
If someone had the same problem and a work around?
Error at startup to the line: 48 in command.
Start
run immediately "create user ORDS_PUBLIC_USER identified by ' ^ PUB_PWD ' account unlock default tablespace ^ temporary tablespace PUB_DATATBS ^ PUB_TEMPTBS';"
end;
Error report-
ORA-06550: Line 2, column 23:
PLS-00103: Fand das symbol "create user ORDS_PUBLIC_USER identified by 'mySecretPwd' als eines der following works wurde:
(- + new case mod not null < an ID >)
< between double quote delimited identifiers of > < a variable binding >
continue the current avg County are min max sql stddev prior
variance of the sum run forall fusion timestamp interval
Date < a literal string with the specified set of characters >
< a > < a SQL string between single quotes > hose
< ein alternativ in Anfuhrungszeichen geset
force_print
It seems to be related to the change here:
https://community.Oracle.com/thread/3731913
Finally the installation of ADR is running. However still not showing apex, but which appear to be a different problem.
Here is my solution to overcome the problem of creation of ORDS_PUBLIC_USER.
The problem was that they changed it to use execute_immediate. However, lexical surrogates have ' included.
Gives problems when adding to the string of immediate execution. And also problems for the password in quotation marks.
In the ords.war file to find the ords_create_rest_users.sql and replace the relevant parts marked with blue lines.
...
set PUB_PWD = ^ 1
set PUB_DATATBS = ' ^ 2'
set PUB_TEMPTBS = ' ^ 3'
ALTER session set current_schema = SYS;
-Remove user REST if exists
...
-Create user ORDS_PUBLIC_USER and unlock the account
create user ORDS_PUBLIC_USER identified by ' ^ PUB_PWD ' account unlock default tablespace ^ temporary tablespace PUB_DATATBS ^ PUB_TEMPTBS;
...
-
PLS-00103: encountered the symbol "ACCEPT" in sql * most report
Hello
SQL > @Testing.SQL
Please enter the Deptno: 30
ACCEPT v_FROM_Date PROMPT ' Please enter the Date(In Format: DD-MON-YYYY) start: '
*
ERROR on line 5:
ORA-06550: line 5, column 1:
PLS-00103: encountered the symbol "ACCEPT."
Clear Buffer; SET Heading ON SET Verify OFF SET Feed OFF SET Linesize 5000 SET Pagesize 2000 SET Serveroutput ON SIZE 1000000 VARIABLE v_FROM_Date VARCHAR2(200); VARIABLE v_deptno NUMBER; Spool Details.txt; --PROMPT Please enter the Deptno: &&v_deptno --PROMPT Please enter the Start Date(In Format: DD-MON-YYYY): &&v_From_Date ACCEPT v_deptno PROMPT 'Please enter the Deptno: ' BEGIN :v_deptno := UPPER(NVL(RTRIM(LTRIM('&v_deptno')),0)); END; ACCEPT v_FROM_Date PROMPT 'Please enter the Start Date(In Format: DD-MON-YYYY): ' BEGIN :v_From_Date := TO_DATE('&v_From_Date','DD-MON-YYYY'); END; select empno,ename,sal,hiredate,deptno from emp where deptno=:v_deptno and to_date(hiredate,'DD-MON-YYYY')=:v_From_Date / SPOOL OFF;
Thank you
Rajesh123 wrote:
- VARIABLE v_deptno NUMBER;
- BEGIN
- : v_deptno: = UPPER (NVL (RTRIM (LTRIM ('& v_deptno')), 0));
- END;
Thank you
The v_deptno variable above is a number data type. So no need to use UPPER LTRIM, RTRIM, functions and why are you using NVL(v_deptno,0)? DeptNo 0 is present in the emp table? If Yes, you can use NVL with 0, otherwise just use any other deptno which is present in the table emp with NVL function.
Rajesh123 wrote:
- Select empno, ename, sal, hiredate deptno
- WCP
- where deptno =: v_deptno
- and to_date (hiredate,'MON-DD-YYYY "") =: v_From_Date
- /
Thank you
HireDate is already a date data type to the emp table then why you try to convert a date once again. Delete this.
Check the code of work after all the applied corrections that are not above below.
Buffer Clear;
SET the position WE
SET verify OFF
SET to power OFF
SET Linesize 5000
SET Pagesize 2000
SET Serveroutput ON SIZE 1000000
V_FROM_Date VARIABLE VARCHAR2 (200);
VARIABLE v_deptno NUMBER;
Reel 'D:\Details.txt ';
-PROMPT please enter the Deptno: & v_deptno
-PROMPT please enter the Date(In Format: DD-MON-YYYY) start: & v_From_Date
ACCEPT v_deptno PROMPT ' Please enter the Deptno: '
ACCEPT v_FROM_Date PROMPT ' Please enter the Date(In Format: DD-MON-YYYY) start: '
BEGIN
: v_deptno: = '& v_deptno ';. -If necessary use NVL ("& v_deptno", 10 (which is present in the emp table))
: v_From_Date: = '& v_From_Date ';.
END;
/
Select empno, ename, sal, hiredate deptno
WCP
where deptno =: v_deptno
and hiredate = TO_DATE(:v_From_Date,'DD-MON-YYYY');
/
SPOOL OFF;
-Edited as suggested by ascheffer
Thank you
Ann
-
Hi guys,.
I have a procedure that retrieves data from database and send it as a table.
I'm not able to plan sound as there any name, can someone guide me how to plan the procedure below.
I'm using oracle 11g.
--
DECLARE
p_from VARCHAR2 (2000): = ' < [email protected] > ';
p_to VARCHAR2 (2000): = ' < [email protected] > ';
p_subject VARCHAR2 (2000): = 'Data Table ';
p_text_msg VARCHAR2 (2000);
p_smtp_host VARCHAR2 (2000): = 'mail.mycompany.com ';
p_smtp_port NUMBER: = 25;
p_html_msg VARCHAR2 (4000);
l_mail_conn UTL_SMTP.connection;
l_boundary VARCHAR2 (50): = '-= * #abc1234321cba #* =';
VC_TAB_DATA VARCHAR2 (4000);
VC_DYANMIC_BODY VARCHAR2 (4000);
TYPE T IS REF CURSOR;
REF_CUR T;
BEGIN
REF_CUR OPEN FOR ' WITH T (empno, dept, empname, desig) AS
(select empno, empname, dept, desig in empma where empmaid in (10540000044681,10491000035992,10631000035900,10461000067982))
Select "< tr > < td >" | EmpName | "< table > < td >" | EmpNo | "< table > < td >" | Dept | "< table > < td >" | desig | "< table > < /tr >"
of you;
LOOP
EXTRACT THE REF_CUR IN VC_TAB_DATA;
WHEN THE OUTPUT REF_CUR % NOTFOUND;
VC_DYANMIC_BODY: = VC_DYANMIC_BODY | » '|| VC_TAB_DATA | » ';
END LOOP;
CLOSE REF_CUR;
VC_DYANMIC_BODY: =' < table border = "1" width = "90%" align = "center" Summary = "output of Script" > < tr >
< scope = "col" th > < font color = "#701B7F" >
EMPLOYEE_NAME
< / make >
< /th >
< scope = "col" th >
< color = "#701B7F" >
EMPLOYEE_NO
< / make >
< /th >
< scope = "col" th >
< color = "#701B7F" >
DEPARTMENT
< / make >
< /th >
< scope = "col" th >
< color = "#701B7F" >
DESIGNATION
< / make >
< /th >
< /tr > ' | VC_DYANMIC_BODY | ' < /table > ';
DBMS_OUTPUT. PUT_LINE (VC_DYANMIC_BODY);
p_html_msg: = ' < html >
< body bgcolor = "#E0E2F8" >
< body > < br > < size = "2" face = "arial" color = "black" > Hi all, < / police > < p > < / p >
< font size = "2" face = "arial" color = "black" > data in the Table are as below: < / font >
'|| VC_DYANMIC_BODY | »
< br >
< br > < font size = "2" face = "CENTURY GOTHIC" color = "blue" > Best looks < / font > < br >
< font size = "2" = "CENTURY GOTHIC" color = "blue" police > Sagar K N < / make >
< /p >
< body / > < / html > ';
l_mail_conn: = UTL_SMTP.open_connection (p_smtp_host, p_smtp_port);
UTL_SMTP. HELO (l_mail_conn, p_smtp_host);
UTL_SMTP.mail (l_mail_conn, p_from);
UTL_SMTP. RCPT (l_mail_conn, p_to);
UTL_SMTP.open_data (l_mail_conn);
UTL_SMTP.write_data (l_mail_conn, ' Date: ' |) TO_CHAR (SYSDATE, "HH24:MI:SS OF MON-DD-YYYY"). UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, ' from: ' | p_to |) UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, ' from: ' | p_from |) UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, ' subject: ' | p_subject |) UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, ' Reply-To: ' | p_from |) UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, "MIME-Version: 1.0 ' |") UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, ' Content-Type: multipart/alternative; limit = "" | ") l_boundary | '"' || UTL_TCP. CRLF. UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, '-' | l_boundary |) UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, ' Content-Type: text/html; charset = "iso-8859-1" ' |) UTL_TCP. CRLF. UTL_TCP. CRLF);
UTL_SMTP.write_data (l_mail_conn, p_text_msg);
UTL_SMTP.write_data (l_mail_conn, p_html_msg);
UTL_SMTP.write_data (l_mail_conn, UTL_TCP.crlf |) UTL_TCP. CRLF);
UTL_SMTP.close_data (l_mail_conn);
UTL_SMTP. Quit (l_mail_conn);
END;
/
Thanks in advance.
Yes GregV, the works of PL/SQL block very well, I tried to put all the code in the Task Scheduler, but it says that the code is too long.
so now, I joined with a procedure and can I use the Scheduler with the stored procedure.
-
PLS-00103: encountered the symbol "PROCÉDURE" when expected
Hi all
LINE/COL ERROR
-------- -----------------------------------------------------------------
13/5 PLS-00103: encountered the symbol "BEGIN" when expecting one of
What follows:
language
22/4 PLS-00103: encountered the symbol "PROCÉDURE" when expected
of the following:
not end up dominant static of final instantiable order pragma
manufacturer membership card
The symbol "static" was substituted for "PROCEDURE continue.
create or replace package xx_extract as procedure xxc_process; procedure xxc_get(in_id emp.empno%type, in_number emp.deptno%type); end ;
create or replace package xx_extract as cursor v_cursor is select empno,deptno from emp a,dept d where e.deptno=d.deptno; v_cursor_rec v_cursor%rowtype; v_in_number emp.empno%type; v_in_date emp.hiredate%type; procedure xxc_process is Begin xxc_get(v_cursor_rec.empno,v_cursor_rec.deptno); open v_cursor; loop fetch v_cursor into v_cursor_rec; exit when v_cursor%notfound; end loop; close v_cursor; end xxc_process; procedure xxc_get(in_id emp.empno%type, in_number emp.deptno%type) is begin select empno,hiredate into v_in_number,v_in_date from emp where empno=to_char(in_id) and deptno=to_char(in_number); EXCEPTION WHEN NO_DATA_FOUND THEN in_id := NULL; in_number := NULL; end xxc_get; end xx_extract;
994122 wrote:
The code below displays all values where I called the procedure before the stmt Open why? Can u please explain.
PROCEDURE xxc_process
IS
BEGIN
xxc_get (v_cursor_rec.empno, v_cursor_rec.deptno);
OPEN v_cursor;
because v_cursor_rec.empno and v_cursor_rec.deptno are empty at this time
994122 wrote:
But as suggested as Roger why we named as below? I need the output when I ran the package and I don't want to call (run) as below
Start
xx_extract.xxc_process ();
end;
the begin... end; box IS running the package, what you do with the create command are CREATION (storage) a package.
-
Getting error PLS-00103: encountered the symbol "MM".
SQL > create or replace procedure DIP. Insert_proc is
2 start
3 immediately execute "INSERT INTO DIP. RAKS (SELECT * FROM DIP.) RAKS WHERE CREATED BETWEEN to_char (TRUNC (ADD_MONTHS (SYSDATE-1), 'MM'), 'YYYYMMDD') AND to_char (TRUNC (LAST_DAY (ADD_MONTHS (SYSDATE-1))), 'YYYYMMDD')); "
4 run immediately "COMMITTED";
5 immediately execute "INSERT INTO DIP. RAKS (SELECT * FROM DIP.) RAKS WHERE CREATED BETWEEN to_char (TRUNC (ADD_MONTHS (SYSDATE-1), 'MM'), 'YYYYMMDD') AND to_char (TRUNC (LAST_DAY (ADD_MONTHS (SYSDATE-1))), 'YYYYMMDD')); "
6 immediate execution "COMMITTED";
7 end;
8.
CAUTION: Procedure created with compilation errors.
SQL >
SQL >
SQL > show error
DIP PROCEDURAL errors. INSERT_SIV_SELL_PROC:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/128 PLS-00103: encountered the symbol "MM" when awaits an of the
Next:
* & = - + ; <>/ is mod remains not return rem
return < an exponent (*) > <>or! = or ~ = > = < = <>and or
as like2 like4 likec between using | bulk of type multiset
Member submultiset
SQL >
any help appreciated.
CREATE OR REPLACE PROCEDURE DIP. Insert_proc IS
BEGIN
immediately execute "INSERT INTO DIP. RAKS (SELECT * FROM DIP.) RAKS WHERE CREATED BETWEEN to_char (TRUNC (ADD_MONTHS (SYSDATE-1), "MM"), "YYYYMMDD") AND to_char (TRUNC (LAST_DAY (ADD_MONTHS (SYSDATE-1))), "YYYYMMDD"))';
RUN IMMEDIATELY "COMMITTED";
immediately execute "INSERT INTO DIP. RAKS (SELECT * FROM DIP.) RAKS WHERE CREATED BETWEEN to_char (TRUNC (ADD_MONTHS (SYSDATE-1), "MM"), "YYYYMMDD") AND to_char (TRUNC (LAST_DAY (ADD_MONTHS (SYSDATE-1))), "YYYYMMDD"))';
run immediately "COMMITTED";
end;
/
Missing semicolon, I modified the last answer but you picked up before it was visible
Maybe you are looking for
-
Satellite M60-104 Graphics Memory
Hello Recently, I bought the computer and look a the specifications on the site Web contains an ATI X600SE graphics card, she has.He also said that in addition to the 128 MB on the card, it can use 128 MB of RAM expanded.The computer however always s
-
Safari does not open a window on el capitan 10.11.3 on iMac mid 2011
What to do to 9.0.3 Safari that doesn't open new window not and loads slowly on el capitan 10.11.3 on an iMac 21.5 inch mid 2011?
-
How can I get the flowers off my toolbars and to return to blue?
Recently, my toolbars of Google has changed from clear blue to a bouquet of flowers. I looked all over the site to try to restore the ordinary appearance. How can I get rid of the flowers? Is recently
-
upgrades of processors to replace the core i3 330 m
What processor upgrades to replace the core i3 330 m in computer hp Pavilion dv6-2150us laptop?
-
How to backup to external hard drive (removable) for windows home server 2011
Your online help recommend ' to use several external hard drives and rotate the drives between onsite and offsite storage locations", but there is nothing that explains the procedures to be put in place. I have vascular 1 internal disk used as a serv