How to Update the database

I have to read one input file which will give me some tables info like TradeNo,MsgId,status etc...
I have read that TradeNo from that input file and then look for that trade no in the database table and in the database I have to update the columns for that particular trade which I am getting fron that input file.....
I dnt know how to write exactly.as i am new to shell Script.
and the other thing I can do is I can pass all these paramaters commandline also...
I really dnt know how to write the scripts and I have to write it in k shell...
help me out....

You request involves alot of stuff; the first thing that you need to do is search the forums for "sqlplus". This will help you get the best start in the right direction.

your shell script may look like this

//to read from file
cat filename |while read line
do
//do some thing
//create sql script
echo "sql command" >>query.sql
//connect to database
sqlplus username/password@query.sql<<STOP
STOP
done

Just be careful with comments. Proper shell comments are with the # character, not //.

Do it all in PL/SQL

UTL_FILE.FOPEN()
LOOP

EXIT WHEN End of file

UTL_FILE.GET_LINE()
Perform update using TradeNo

END LOOP
UTL_FLE.FCLOSE()

UTL_FILE :eek: too, too, too slow.

Thank you i will try this stuff and update you..

Actually i can't use UTL_FILE package as it is not supported in MS-SQL server and Sybase.So can u give me some other alternative for this.
Plz help me if u can provide me the dummy code to run the query from the script and also do tell me that what are the package or libraries has to be installed to form the connection with the databse..

Plz reply me as soon as possible.