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 8809959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:00:23+00:00 2026-06-14T03:00:23+00:00

I want to enter a value by console in Oracle 10g with PL SQL.

  • 0

I want to enter a value by console in Oracle 10g with PL SQL. I am using the web based interface and not the SQL*.
The program is like this:

DECLARE
      v_desc VARCHAR2(50);
BEGIN
    v_desc:=show_desc(&sv_cnumber);
    DBMS_OUTPUT.PUT_LINE(v_desc);
END;

and the function is:

CREATE OR REPLACE FUNCTION show_desc
    (i_course_id course.course_id%TYPE)
RETURN varchar2
AS
        v_desc varchar2(50);
BEGIN
SELECT description
    INTO v_desc
    FROM courses
WHERE course_id=i_course_id;
RETURN v_desc;
EXCEPTION
    WHEN NO_DATA_FOUND
   THEN
    RETURN('no description found');
END;    

when I run this code, I got an error that says:

ORA-06550: line 4, column 37:
PLS-00103: Encountered the symbol “&” when expecting one of the following:

what is the mistake?
Thanks

  • 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-06-14T03:00:25+00:00Added an answer on June 14, 2026 at 3:00 am

    If you want a prompt to be displayed so you can enter a value for the variable, try replacing & with colon

    v_desc:=show_desc(:sv_cnumber);
    

    & is a special symbol in PL/SQL

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to enter a value and check if it is
With my Application, i want to make sure if user enter no value in
This is a mystery.. in my controller Add function i want to enter the
Well i have calculator. In which i want to accept value in this $1,000,000
I want to make this array using JavaScript: ----------------------------------------------- | | male | |
I have an edittext view with a default text value like 'Enter Value'. When
I'm reading values from in from a console using readLn . I'd like to
I have edittext where I want to enter percentage value i.e decimals value, So
This is a chart that I have made using d3.js. I want my bars
I am writing a small console application in C# using Visual Studio. I want

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.