Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Print Message

User_3YG3JFeb 22 2016 — edited Feb 22 2016

Hey Folks,

I am facing one problem. I have created on PLSQL Block in which First I am printing one menu and taking user input. Now when I execute this Program 'First it asking me for the Input instead of Printing Menu'. Below is the code which I am executing on SQLPLUS Prompt from CMD. Please Help Me to Understand why it asking for the input as i Have Already Written dbms_output statements in Code and please correct me if i am doing something wrong.

declare

ch number;

begin

  dbms_output.put_line('******************* M E N U **************************');

  dbms_output.put_line('1. For Pharmacy.');

  dbms_output.put_line('2. For Patient.');

  dbms_output.put_line('3. Exit');

   ch:=&ch;

end;

Output :-

Enter value for ch: 10

old   8:    ch:=&ch;

new   8:    ch:=10;

******************* M E N U **************************

1. For Pharmacy.

2. For Patient.

3. Exit

PL/SQL procedure successfully completed.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2016
Added on Feb 22 2016
6 comments
2,290 views