Home » SQL & PL/SQL » SQL & PL/SQL » how to give user inputs through procedure
how to give user inputs through procedure [message #263827] Fri, 31 August 2007 02:25 Go to next message
sankara.gattu
Messages: 10
Registered: August 2007
Location: bangalore
Junior Member

Hi Team,

pls help to me,

how to give the user define inputs thru procedure
Re: how to give user inputs through procedure [message #263829 is a reply to message #263827] Fri, 31 August 2007 02:28 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'd do that through procedure parameters.
CREATE PROCEDURE prc_test (par_1 in number, par_2 in char)
IS
...
Re: how to give user inputs through procedure [message #263832 is a reply to message #263829] Fri, 31 August 2007 02:38 Go to previous messageGo to next message
sankara.gattu
Messages: 10
Registered: August 2007
Location: bangalore
Junior Member

i need to create the procedure for give the run time input values
Re: how to give user inputs through procedure [message #263839 is a reply to message #263832] Fri, 31 August 2007 02:54 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Since stored procedures run inside the database, there is no way to get userinput at runtime.
Re: how to give user inputs through procedure [message #263845 is a reply to message #263827] Fri, 31 August 2007 03:04 Go to previous messageGo to next message
sankara.gattu
Messages: 10
Registered: August 2007
Location: bangalore
Junior Member

Hi,
pls hav look into this procedure
CREATE OR REPLACE PROCEDURE SpowPpidMappingDelete
(v_PpId IN VARCHAR2
)
IS
BEGIN
DELETE
FROM SPOW_RETAILER
WHERE PP_ID = v_Ppid;
DBMS_OUTPUT.PUT_LINE(' The account has been removed from spow retailer');
COMMIT;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
END SpowPpidMappingDelete;
/
that procedure is normal. but i need to give run time values thru this procedure
Re: how to give user inputs through procedure [message #263849 is a reply to message #263845] Fri, 31 August 2007 03:12 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Some remarks:
- Read Frank's reply again.
- WHEN OTHERS without a RAISE means you don't care whether the procedure executed successfully.

And what other values will you pass besides the input parameter?

MHE
Re: how to give user inputs through procedure [message #263863 is a reply to message #263849] Fri, 31 August 2007 03:35 Go to previous message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In addition,
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: Problem with stored procedures
Next Topic: merge full syntax in oracle 10g
Goto Forum:
  


Current Time: Sun Dec 11 06:20:54 CST 2016

Total time taken to generate the page: 0.12179 seconds