Question

PL/SQL input Y/N

Rating8.8Very Good

I have a piece of PL/SQL that I want to ask the user to confirm a commit, displaying an 'Is this ok?' message and then either committing or rolling back depending on whether they enter Y or N. This is the code so far. Can anyone help fill in the gaps?

Thanks.

-- Ask user if it is ok to proceed

dbms_output.put_line('Do you want to save these changes?');
      return;

proceed:= YorN;

if proceed = 'Y' then
      dbms_output.put_line('Saved');
      commit;
    else
      dbms_output.put_line('Cancelled');
      rollback;
    end if;

  1. Ask for User input in PLSQL Loop
    I would like to get user inputs in PLSQL loop. I use variable substitution to get the user input. For example Begin Loop Exit when '&continue' = 'n'; -----------some work----------- End Loop; End; / SQL will prompt me for value for the parameter "co…
  2. I cannot save the input in an Oracle form.
    I am developing a oracle form ( form version 11.0.0) I created a form named "media_request_info". Its base table is a view with multiple tables, this form is linked to a master form named license_products form by inventory_item_id. Each license product is linked to each media request. Not each product has a media request. …
  3. Oracle Forms - post query prompts user to save
    I have a post-query trigger that changes the value of a field.. When the screen is switched to the next record I need that change saved.. currently is is prompting the user "Do you want to save the changes you have made?" how can I suppress this and just commit the changes.. commit, commit_form and clear_block(do_…
  4. PL/SQL code - DBMS_OUTPUT.PUT_LINE
    I'm trying to see the result from a spool file but I only got "PL/SQL procedure successfully completed." How do I get to see the resutl from a spool file? set serveroutput on spool c:\test.log DECLARE v_rec_text VARCHAR2(500); v_fallback_plan VARCHAR2(10); v_fallback_plan_rate number…
  5. PL/SQL User input procedures acting up
    I have a package for the SCT sunguard banner system that is meant to be a digital version of an employee performance review form. When I try to test it, the first procedure pulled (pmfstart) works just fine: it accepts the input from the HTML form, and calls pmfmiddle. Our problem comes in pmfmiddle when we need to submit the data obtained from the HTML f…

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Zone
General
Tags
input user
Participating Experts
3
Solution Grade
A

Replies

 
by: schwertner

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: paquicuba

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: paquicuba

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: sujit_kumar

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by:

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts

slightwv

slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv

sdstuber

A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber

Testimonials

What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv

    2,000

    0 points yesterday

    Profile

BrowseBecome an Expert