If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Can PL/SQL Acccept an inputted variable?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-28-03, 12:32
burningmoney burningmoney is offline
Registered User
 
Join Date: Sep 2003
Posts: 12
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??????

Example:
SQL> Insert First Name?
SQL>

Thank you for any help with this....
Reply With Quote
  #2 (permalink)  
Old 12-09-03, 16:12
Bart71 Bart71 is offline
Registered User
 
Join Date: Oct 2003
Location: Germany - Stuttgart
Posts: 14
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.
Reply With Quote
  #3 (permalink)  
Old 12-09-03, 16:22
burningmoney burningmoney is offline
Registered User
 
Join Date: Sep 2003
Posts: 12
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
Reply With Quote
  #4 (permalink)  
Old 12-11-03, 15:54
joebednarz joebednarz is offline
Registered User
 
Join Date: Dec 2003
Location: Oklahoma, USA
Posts: 354
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:

Code:
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...

JoeB
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On