Questions tagged [pls-00103]

PLS-00103 is an error message in Oracle, which points to a wrong symbol in the query: Encountered the symbol "$symbol" when expecting one of the following:

The complete error message reads like this:

PLS-00103: Encountered the symbol "$symbol" when expecting one of the following:
( begin case declare end exit for goto if loop mod null
pragma raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge )

73 questions
1
vote
1 answer

Calling stored procedure from another stored procedure oracle

How can we call a stored procedure from another stored procedure? Below is my code where I am trying to call a stored procedure from another stored procedure, but compilation gives an error CREATE OR REPLACE PROCEDURE USP_BookMovieTickets ( p_SIId…
displayname
  • 317
  • 1
  • 5
  • 15
1
vote
1 answer

Oracle PL/SQL Error PLS-00103

This is the code: set serveroutput ON; DECLARE id_emp NUMBER := '&EmpleadoNumero'; n_commission DOUBLE; BEGIN SELECT i.id, Decode(i.commission_pct, SUM(i.commission_pct) > 100000, i.commission_pct + (…
Ilemar
  • 21
  • 3
1
vote
1 answer

PLS-00103: Encountered the symbol "end-of-file" compile error

Can't find anything wrong with this, but it compiles with errors. Anyone see what I am blind to? CREATE OR REPLACE FUNCTION myusername.fun_hr_format_phone (tmp in VARCHAR2) RETURN VARCHAR2 IS tmpVar VARCHAR2(12); BEGIN SELECT DECODE( …
lrjurgen
  • 21
  • 2
  • 3
1
vote
3 answers

PLS--00103 error in pl/sql

I was writing a simple program of senior citizen checking. But the error baffled me. The code as follows declare gen char(1); age number(3); begin gen:='&gen'; age:=&age; if age>65 and gen='m' then …
Swayambhu
  • 458
  • 2
  • 8
  • 19
1
vote
0 answers

"PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ;" Can anyone spot the error in my code?

I'm following an Oracle guide call 'Adventure Travel' and in the guide it says to create this procedure: CREATE OR REPLACE PROCEDURE add_country_for_activity(p_activity_num AT_COUNTRY_ACTIVITIES.activity_num%TYPE,p_country_id…
1
vote
1 answer

Getting PLS-00103 error when creating a function in Oracle

Im getting a couple of errors within my following function: CREATE OR REPLACE FUNCTION department_salary (emp_dept VARCHAR2, salary NUMBER) RETURN NUMBER AS dept_sal NUMBER := salary; BEGIN IF emp_dept = 'MIS' THEN…
0
votes
2 answers

PLSQL encountered the symbol "end-offile"... PLS-00103

I'm quite new at PL SQL, when I tried to write sth like below: BEGIN FOR foo IN (SELECT A, B, C FROM foo_table WHERE some_conditions) LOOP DBMS_OUTPUT.PUT_LINE('sth here') END LOOP; I got following error while executing statment in SQL…
0
votes
1 answer

How to execute the procedure

How to call the procedure and function from the package? PROCEDURE P_INSERT_PER_LG(IN_DATA DATE, IN_CHECK VARCHAR2, IN_PSE VARCHAR2, IN_TP_CHECK VARCHAR2, IN_STATUS NUMBER, IN_MSG VARCHAR2, …
0
votes
0 answers

Pl Sql pls-00103-encountered-the-symbol / or create

i'm trying to use this package https://technology.amis.nl/wp-content/uploads/2021/03/as_xlsx20.txt to create xls file from a query. If i paste the code in a package in sql developer, i get the error: Pl Sql pls-00103-encountered-the-symbol / at line…
AmiStack
  • 23
  • 7
0
votes
1 answer

PLS-00103 stuck with this error in pl/sql

I have been trying to display only the odd numbers between two user entered numbers by checking if both the numbers are positive. Here's my pl/sql block : declare num1 number(3); num2 number(3); begin num1 := &num1; num2 := &num2; …
0
votes
1 answer

oracle PLS-00103 Error after executing a simple query

this is the code that I ran in the Oracle SQL Developer and the error has come next: It is a very simple query so what's wrong whit it? DECLARE zero varchar(20); DECLARE emptys; begin zero := '0'; emptys := null; IF(emptys = zero) then…
Tahere
  • 15
  • 4
0
votes
2 answers

Cannot write if or select above begin on a procedure

Im building a procedure for a class proyect where i have to invent some procedure related to my country football league. Right now im developing a procedure to show the results of a match, with the trainer, players, cards and goals after introducing…
Wazabi
  • 83
  • 5
0
votes
1 answer

Text parameter in procedure?

I have one task to solve. Create a procedure that will list all branches from the locations table based on the specified country_name from the countries table. The listing will be country_name, city, street_address, state_province.Treat the case if…
Kristina
  • 15
  • 4
0
votes
1 answer

PLS-00103: Encountered Symbol DECLARE/EOF when trying to increment values with a sequence

I'm working on a procedure that will declare a variable, take the value from a procedure that increments, and inserts that value along with other parameters into a table. I thought I had it all worked out, but then I got hit with PLS-00103:…
Paul_00
  • 11
  • 3
0
votes
2 answers

Oracle: exception and error

I have written this function in SQL and I can't figure out why but it keeps on returning an error in the exception section. I've checked the syntax, got documented but I had no luck, will anyone please help? Error returned: Error on line 83:…
haunted85
  • 1,601
  • 6
  • 24
  • 40