Home » Infrastructure » Unix » Urgent HElp
Urgent HElp [message #98325] Wed, 21 July 2004 23:25 Go to next message
pulkit
Messages: 18
Registered: April 2004
Junior Member
HI,

 

Can any one tell me how to call a stored procedure from a shell script.

 

regards

Pulkit
Re: Urgent HElp [message #98326 is a reply to message #98325] Thu, 22 July 2004 00:20 Go to previous message
Jai Vrat Singh
Messages: 205
Registered: September 2002
Location: Singapore
Senior Member
-

Like this

#!/bin/ksh

sqlplus mylogin@mySID/mypassword<b><<</b>STR

variable name varchar2(30)
exec :name:=  'jai';

--method 1
execute my_test_proc(:name);

--method2
declare

v_name varchar2(30);

begin

for i in 1..5
LOOP
  v_name := to_char(i)||'XXXX';
  my_test_proc(v_name);
END LOOP;
end;
/

STR



-
Previous Topic: A shell script that login to sqlplus
Next Topic: UNIX installation on ordinary PC
Goto Forum:
  


Current Time: Tue Sep 22 07:36:48 CDT 2020