shell script & sqlplus "plzz help"

hi friends,
i m tryin to load data from one set of table to other i have sql procedure al ready for it..!

i m going to load the procedure only if data in one of my table for example

table "landing " have 10 records each attribute of this table is

file_name status date are the 3 atributes

wht i want to do is if all 10 records have status "c"
then it shuld load some procedure...

or else if status is not "c" then load some other tables

please help me in this ...

thnxs in advance

the script i wrote till knw is

ProcessedStatus=`sqlplus -s "abcd"/"abcd" << END
set pagesize 0
set feedback off
set verify off
set heading off
set echo off

set serveroutput on
select count(*) from landing where program_status='C'and extract_date in (select distinct max(extract_date
) from pmd_audit_data_load_master);
exit;
END`

echo $ProcessedStatus
if [ $ProcessedStatus = 10 ] ;
then

exec SP_LND_APP;
exec SP_LND_APPLI;
exec SP_TEMP_ON;

END

fi
#echo"processing error procedures:"
#exec SP_LND_APPL_ERR;
#exec SP_LND_APPLI_ERR;
#END
#fi
#

i tryed this but didt work can u ppl please help me out

I am not clear about your requirements but want to try:

based on some value of "ProcessedStatus" you want to execute some pl/sql procedure.

try this

if [ $ProcessedStatus = 10 ] ;
 then 
 `sqlplus -s abcd/abcd <<END
   begin
   your_procedure_1;
   end;
   exit;
   END`

 else
`sqlplus -s abcd/abcd <<END
   begin
   your_procedure_2;
   end;
   exit;
   END`
fi

this friend ..
this is wht i was trying to do is ther any alternate solution ..!

for doing this ..
any what u ppl thing is tht query gonna give the write o/p as wht i needed ;(