calling sqlplus, sending variable to input a function [message #498611] |
Thu, 10 March 2011 08:56 |
nichollsvi
Messages: 8 Registered: May 2009 Location: Va.
|
Junior Member |
|
|
Hi,
Having a problem here. I'm on Linux/RHEL 5. I'm trying to get a script to work and I receive no error messages, but it doesn't work.
All I am doing is calling my Unix script with several variables ($1, $2, $3, $4). I get into Sqlplus. At that point, I want to set a variable with the outcome of a function call & my Unix variable. However, the system never updates. Any ideas? All the ideas I've seen so far suggest this should work OR they put all this in another sql script and call it. We really need to not add another script on top of that.
Any ideas? Thanks,
Vic
LOAD_WEEK=$4
export LOAD_WEEK
sqlplus /nolog <<EOF
connect odumgr/$2@$1
declare
RetVal DATE;
begin
RetVal := odumgr.f_ods_et_hist($LOAD_WEEK);
update odu_enrollment_tracking_vic
set cube_created = RetVal;
commit;
end;
exit;
EOF
|
|
|
|
|
|