Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6916153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:33:56+00:00 2026-05-27T09:33:56+00:00

I am getting the below error for the PL/SQL block I executed. ORA-06550: line

  • 0

I am getting the below error for the PL/SQL block I executed.

ORA-06550: line 16, column 1: PLS-00103: Encountered the symbol
“EXCEPTION” when expecting one of the following:

My anonymous procedure below was working fine until I included the user defined exception e_nonrented. Which checks if the value of bindvariable :g_movie_id=2.. If that is the case it throws an exception…

Below is the code:

VARIABLE g_movie_id NUMBER EXEC :g_movie_id := 2
DECLARE v_count NUMBER;
v_movieid NUMBER;
v_title mm_movie.movie_title%TYPE;
e_nonrented

 EXCEPTION;
BEGIN
  SELECT m.movie_title,
    COUNT(r.rental_id),
    r.movie_id
  INTO v_title,
    v_count,
    v_movieid
  FROM mm_movie m,
    mm_rental r
  WHERE m.movie_id = r.movie_id
   AND m.movie_id = :g_movie_id
  GROUP BY m.movie_title,
    r.movie_id;
  DBMS_OUTPUT.PUT_LINE(v_title || ': ' || v_count);

  IF :g_movie_id = 2 THEN
    RAISE e_nonrented;

  EXCEPTION
  WHEN no_data_found THEN
    DBMS_OUTPUT.PUT_LINE('there is no movie id for: ' || :g_movie_id);
  WHEN e_nonrented THEN
    DBMS_OUTPUT.PUT_LINE(' Movie with Id ');
  END;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:33:56+00:00Added an answer on May 27, 2026 at 9:33 am

    You’re simply missing an END IF; statement.

      IF :g_movie_id = 2 THEN
        RAISE e_nonrented;
      END IF;
    
    EXCEPTION
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the error below for this SQL statement in VB.Net 'Fill in the
I'm getting the following error on the line of code below: Syntax error (missing
i'm getting exception on Transformer transformer = tFactory.newTransformer(StreamXSL); but the error below is not
While using inner join on Pro*C I am getting the below error: PCC-S-02201, Encountered
I'm getting the error below when I try and access SSRS on SQL Server
I was changing the vc++ include directory with new paths suddenly getting below error
I am getting the below error when executing my application on a Windows XP
i'm getting the below error, When compiling the Asp.Net web deploy project Could not
I am getting the error below when I call my WCF service. What am
We are getting the error below calling c:\windows\syswow64\regsvr32.exe on Windows Server 2008 R2 x64.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.