Condition the script execution on the user's choice from a query result
Sorry if the title is not clear, let me explain.
I'm creating a SQL*Plus script where I want the user to enter a value which will be used in a query (as the pattern in the LIKE condition).
Then, here is the conditional processing I'd like to run:
If the query returns no rows, then display a message indicating the user that there's nothing to process and exit.
If the query returns several rows, then display the list of rows and prompt the user for choosing one value in the list and process with the rest of the script.