Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003

    Unanswered: Can PL/SQL Acccept an inputted variable?

    My "Query" refers to the ability to input variables in a PL/SQL Procedure.

    Basically I am able to to input variables using the normal method
    Exec procedure(variable1, variable2)

    However I want to know if it is possible to code in such a way that the user inputs a variable when requested by the code:
    For instance when the procedure is run, I want the DBMS to ask questions and accept the variables I put in to answer them
    Sort of like the DBMS_OUTPUT but in reverse.
    DMBS_INPUT perhaps??????

    SQL> Insert First Name?

    Thank you for any help with this....

  2. #2
    Join Date
    Oct 2003
    Germany - Stuttgart
    This is not possible...normally the database server running far away from the user and can't interact directly with him/her.
    For such inputs you must implement a frontend...maybe an ms-access frontend can solve your problem.

  3. #3
    Join Date
    Sep 2003
    The project is an all Oracle affair, hopefully Oracle correct this problem because it would be handy to have this feature.
    Thanks for your help and time Bart71

  4. #4
    Join Date
    Dec 2003
    Oklahoma, USA
    If you are allowing your user to input directly through SQL Plus, I would suggest giving them a script to run rather than having them execute a package/procedure. Create a "test.sql" file as follows:

    accept a prompt "Input First Name?"
    execute my_procedure( '&&a' );
    You can add whatever else you need; after that, from SQL Plus they would type:

    SQL> @test.sql

    However, HIGHLY suggest having users go through a program interface rather than directly through SQL Plus...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts