Hi Shell_Life,
If I list out content of
> cat xaa | head
392183921|94389549|A584958|TOM|11, CON STREET|BROADWAY|1122
Somehow, this is what could figure out on how to read from if it is single file
while read file
do
_msisdn=$(echo $file | cut -d "|" -f 1)
_cust_ic=$(echo $file | cut -d "|" -f 2)
_cust_pass=$(echo $file | cut -d "|" -f 3)
_cust_name=$(echo $file | cut -d "|" -f 4)
_cust_street1=$(echo $file | cut -d "|" -f 5)
_cust_street2=$(echo $file | cut -d "|" -f 6)
_cust_post=$(echo $file | cut -d "|" -f 7)
echo "UPDATE customer SET cust_alt_fax='$_cust_ic',cust_bld_nr='$_cust_pass',cust_name='$_cust_name',cust_street_1='$_cust_str eet1',cust_street
_2='$_cust_street2',cust_add_pcode='$_cust_post',chk_upd_dt=CURRENT" >> upd_addl_reg.sql
echo "WHERE cust_msisdn='$_msisdn';" >> upd_addl_reg.sql
done < xaa , xab... ... xhx
Due to db limitation, I have to perform update 20000 rows at a time to reduce load, that's why you could see i split files to several as named below.
Please advise