How to pass a parameter to SQL from shell script loops
AppsGMPMar 15 2011 — edited Mar 16 2011Hi All,
I am new to Unix commands. I got one requirement to pass parameter to SQL from shell script. I am able to pass the parameter if there is no loops. But inside the loops i tried to pass the parameter, but it is passing null values. My code as follows.
for FILENAME in `ls $P_FILE_PREFIX*`; do
FILE=`ls $FILENAME`
FCP_LOGIN='apps/apps'
P_RESP_NM=`sqlplus -s apps/apps<< START
SET HEADING OFF
SELECT '"'||responsibility_name||'"'
FROM fnd_responsibility_vl
WHERE responsibility_id = (SELECT responsibility_id
FROM fnd_concurrent_requests
WHERE ARGUMENT2=*$FILENAME*); EXIT START`
Here the parameter $FILENAME returns null. Anybody can suggest me what i missed.
Thanks in advance.