hi below
perl script may help you some
Not sure whether your column is in fixed length, if yes, can remove those trim( and ), and the number of < indicate the length of your value, so make sure use the longest < for all of them depending on your longest column value.
Code:
format TOP=
insert into table_xyz values(@<<<<<,@<<<<<,trim('@<<<<<<'),@<<<<<,trim('@<<<<<'),trim('@<<<<<'),trim('@<<<<<<'),@<<<<<<);
$a $b $c $d $e $f $g $h
.
$~=TOP;
open FH,"<a.txt";
while(<FH>){
($a, $b, $c, $d, $e, $f, $g, $h)=split(" ",$_);
write;
}
close FH;