updating a column in oracle table using shell script

Hi friends,
i am having a variable declared in .profile.i am changing its value in a shell script and then i am connecting to oracle and then from there i am calling a .sql called update.sql
STATUS is the variable declared in the .profile

if [ $STATUS -eq 1 ]
sqlplus <<END
username/password@connectstring
@update.sql
commit;
but how to i pass the value of the $STATUS to the .sql ? this value has to go into a column in a table.
Please help
thanks in advance
Veera

You can specify STATUS value as &1 in update.sql file and call the script as
@update.sql $STATUS
or
@update.sql 1 as the script is called only if STATUS is equal to 1

Hi SSSROW,
Thanks for the reply but it doesnt help me. the update is not taking place.
it says zero rows updated.
Please help out.
thanks
Veera

sssow's post should accomplish what you are requesting. Can you provide your update.sql script? It should look something like this:

-- update.sql
update yourtable 
set    status=&1
where  whatever='some key value';

And your usage of update.sql should look like this:

if [ $STATUS -eq 1 ]
sqlplus <<END
username/password@connectstring
@update.sql $STATUS
commit;
END

Thomas