This discussion is archived
7 Replies Latest reply: Nov 8, 2010 11:35 PM by 811555 RSS

passing unix variable value to plsql block

user119247 Newbie
Currently Being Moderated
hi..
i want to pass the value of a unix variable to a pl/sql block. I dont know how to go about it.
My code is
for all the files in the directory, ( say $i as the file name )
-------
sqlplus -s << eof
cmdp_rdev/cmdp_rdev@cmdp
declare
no number:= 0;
BEGIN
no := run_owb_mapping('CMDP_RDEV','LOC_PROC_FLOW','PROCESS','PROCESS_HOTEL_DATA',CUSTOM_PARAMS='FILE_NAME=$i');
end;
/
eof
-----

In the above example, i want the file name ( if x.txt ) to be passed to the procedure call as :
no := run_owb_mapping('CMDP_RDEV','LOC_PROC_FLOW','PROCESS','PROCESS_HOTEL_DATA',CUSTOM_PARAMS='FILE_NAME=x.txt');


How do i do this..
thanx in advance