Home » SQL & PL/SQL » SQL & PL/SQL » PlSql Command that display message and get a value from user with in a PLSQL Block (Oracle Developer, Forms 6i, Windows Xp)
PlSql Command that display message and get a value from user with in a PLSQL Block [message #551660] Fri, 20 April 2012 01:00 Go to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Hi,

I need to know a plsql command that can display a custome message and also gets a value from the user with in a procedure.
Re: PlSql Command that display message and get a value from user with in a PLSQL Block [message #551663 is a reply to message #551660] Fri, 20 April 2012 01:04 Go to previous messageGo to next message
Littlefoot
Messages: 21825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
DBMS_OUTPUT.PUT_LINE is capable of displaying a message. This is mostly useless as no end-user will ever see it (unless your users run procedures in SQL*Plus, for example). Therefore, consider use of OUT parameters.

Value can be passed from a user to a procedure through procedure's IN parameter(s).
Re: PlSql Command that display message and get a value from user with in a PLSQL Block [message #551666 is a reply to message #551660] Fri, 20 April 2012 01:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
In short, PL/SQL runs on the server and get input from its call and returns its output at the same time than it gives back the control to the caller.
Even dbms_output works in the same way, you get the content of dbms_output buffer AFTER you get back the control (but using dbms_output.get% procedure or implicitly with SQL*Plus).

The built-in only way to get intermediate result is table/pipelined function (and dbms_debug but this another story).
You can also read and write through pipes using dbms_pipe package; a PL/SQL procedure can read input parameters from a pipe and write its ouput into another one.

Regards
Michel
Re: PlSql Command that display message and get a value from user with in a PLSQL Block [message #551671 is a reply to message #551666] Fri, 20 April 2012 01:28 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Guys thanks for quick response. My issue is I need a database stored procedure that when executed ask user for few information and then insert that data in a table.

So I need a command that can display my custom message and at the same time takes some data from user as input.
Re: PlSql Command that display message and get a value from user with in a PLSQL Block [message #551674 is a reply to message #551671] Fri, 20 April 2012 01:37 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Nothing built-in, you have to create it, for instance using dbms_pipe.

Regards
Michel
Re: PlSql Command that display message and get a value from user with in a PLSQL Block [message #551677 is a reply to message #551674] Fri, 20 April 2012 01:41 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
ok is there a builtin that take user input like DBMS builtin
Re: PlSql Command that display message and get a value from user with in a PLSQL Block [message #551686 is a reply to message #551677] Fri, 20 April 2012 02:00 Go to previous message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
No (third time).

Regards
Michel
Previous Topic: problem in subquery
Next Topic: Calling a Web Service with SSL (working on a WCF SOAP webservice)
Goto Forum:
  


Current Time: Sun Aug 03 06:53:12 CDT 2025