If not working...pls help:URGENT

Following is d code snipet

#!/bin/ksh
retVal=`sqlplus -s user/passwd\@oracle_sid <<EOF
SET SERVEROUTPUT ON SIZE 100000
DECLARE
STATUS_VALUE VARCHAR2(1);
BEGIN
SELECT temp1 INTO STATUS_VALUE FROM sai;
DBMS_OUTPUT.PUT_LINE(STATUS_VALUE);
END;
/
exit;
EOF`
echo "Return Value Is=$retVal"

if [[ $retVal = "N" ]]; then
echo "Refresh is still going on"
else
echo "Refresh is done!! You can start the make"
fi

The output is :
Return Value Is=N

Refresh is done!! You can start the make

Though the value of retVal is "N"...why its going in to else part ??:frowning:

TIA.

If I am correct retVal will have lot of other values than "N".

Could you provide us the value of this line?

You need to place double quotes around $reval i.e.

if [[ "$retVal" = "N" ]]
then
    ......
fi

try this:

if [ $retVal -eq N ]; then
echo "Refresh is still going on"
else
echo "Refresh is done!! You can start the make"
fi

thanx for reply...
but both the solutions r not working guys ... :(:frowning:

The o/p of ....echo "Return Value Is=$retVal" is
Return Value Is=N (wch i hav alredy mentioned in my post)

& column temp1 is a char.(either N or C)

pls help...i'm not getting wht's going wrong..