Home » SQL & PL/SQL » SQL & PL/SQL » Procedure in ksh
Procedure in ksh [message #305080] Sat, 08 March 2008 04:21 Go to next message
arienaji
Messages: 2
Registered: March 2008
Junior Member
Am writing a code wherein am executing a procedure from a ksh script. the procedure requires a date as one of the parameter. I have to manipulate the sydate and pass that value to that parameter.
how to go about it.
Re: Procedure in ksh [message #305083 is a reply to message #305080] Sat, 08 March 2008 04:55 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
http://www.orafaq.com/forum/t/97308/94420/

Regards

Raj
Re: Procedure in ksh [message #305087 is a reply to message #305083] Sat, 08 March 2008 05:43 Go to previous messageGo to next message
arienaji
Messages: 2
Registered: March 2008
Junior Member
Thanks Raj.
But the link doesnt give me the result what i want.

This is my code snippet

--------------
#!/bin/ksh
export emp_id=100
a=$(sqlplus -s $DATABASE <<-EOF
var returnid number;

select sysdate+2/86400 today from dual;

exec kickoff(${emp_id},:today,,:returnid);
commit;
print returnid;
EOF
)
-----------------

My procedure kickoff has two IN paramaters and one OUT parameter. One of the IN parameter(emp_id), am getting is from my shell and passing it here.
The second IN parameter needs a date which is 10 seconds from sysdate. I want this one to be calculated and passed on to the procedure. For that I was thinking of manipulating the sysdate by querying the dual, somehow store it in a variable and pass it to the procedure. And this is where am failing.

Any help will be greatly appreciated.

Thanks in advance
Re: Procedure in ksh [message #305091 is a reply to message #305087] Sat, 08 March 2008 06:16 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Post the output of the following code :
desc kickoff

Also take some time to read the forum guidelines.

Regards

Raj
Re: Procedure in ksh [message #305101 is a reply to message #305087] Sat, 08 March 2008 08:57 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Just use:
exec kickoff(${emp_id,sysdate+2/86400 ,:returnid);


Regards
Michel

[Updated on: Sat, 08 March 2008 08:57]

Report message to a moderator

Previous Topic: Questions about to_char and Assigning date to a DATE datatype variable
Next Topic: UPDATING AND INSERTING DATA IN A TABLE IDENTICAL TO OTHER TABLE
Goto Forum:
  


Current Time: Sat Dec 10 14:54:12 CST 2016

Total time taken to generate the page: 0.04446 seconds