Using loop reading a file,retrieving data from data base.

Hi All,

I am having trouble through, I am reading the input from tab delimited file containing several records,

e.g.

line1 field1 field2 field3 so on..
line2 field1 field2 field3 so on..
..
..

on the basis of certain fields for each record in input file, I have to retrieve data from oracale database.

and using copy command move the record to different location..

Thanks in advance.
Sonu.

while read fld1 fld2 fld3
do
echo $fld1 $fld2 $fld3
done<file