General discussion

Locked

Terminating a loop based on user input

By amal_iv ·
How do I terminate a loop in a PL/SQL block depending upon user input.

For Example:
Suppose the purpose of the PL/SQL vlock is to display total of all the numbers entered by the user. The user enters one number after which a confirmation is asked whether he wants to enter more numbers. If the responds with a Y then the next number is asked. This continues till the user responds with N. Then the total of all the numbers are returned.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Terminating a loop based on user input

by AndrewF In reply to Terminating a loop based ...

Hi,

I was under the impression that PL/SQL was not interactive, and that once a block was called it could not really interact with the user. In a case such as that I would have a PL/SQL sub/function called by an external source that stored the value in a small table.. The calling app could then take responsibility for checking the Y/N input.

Any other suggestions ?

Collapse -

Terminating a loop based on user input

by amal_iv In reply to Terminating a loop based ...

The question was auto-closed by TechRepublic

Collapse -

Terminating a loop based on user input

by jereg In reply to Terminating a loop based ...

you could try calling a Visual Basic routine to do that.

Collapse -

Terminating a loop based on user input

by amal_iv In reply to Terminating a loop based ...

The question was auto-closed by TechRepublic

Collapse -

Terminating a loop based on user input

by amal_iv In reply to Terminating a loop based ...

This question was auto closed due to inactivity

Back to Desktop Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums