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!

how to write interactive sql plus loop

707291Mar 25 2010 — edited May 18 2011
i have requirement of writing sql plus script , which creates a user
password would be entered by user interactively. I wrote some algo like this but not working.

Algorithm:
========
VARIABLE PSWD VARCHAR2
VARIABLE PSWD2 VARCHAR2

BEGIN
WHILE TRUE LOOP
ACCEPT pswd PROMPT 'Password: ' HIDE
ACCEPT pswd2 PROMPT 'Re enter-Password: ' HIDE
if pswd != pswd2 then
prompt 'password not matching'
ELSE
PROMPT 'PASSWORD MATCHING'
end IF;
EXIT;
END LOOP;
END;
=========================
i know sql plus doesn't have control structures and pl/sql doest have input statements ?

thanks in advance for your reply.
phani
This post has been answered by Frank Kulash on Mar 25 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2011
Added on Mar 25 2010
7 comments
4,092 views