Hello Fellow monks I need some help with the update of one of the CSV files that Im trying to do. Basically one of the file has set of records which I dont want to update for example
Above is the file format. what i need to do is to start updating this table from row 3 where the actual data isSouce Data X~Y~Z 1~2~3 col1~col2~col3~col4~col5 A~B~C~D~E
my $dbh = DBI->connect("dbi:CSV:",undef,undef,{ f_dir => $_ENV::TempFilesDIR, csv_sep_char => "~", csv_quote_space => 0}) or die $DBI::errst +r; $dbh->{'csv_tables'}->{'cimp_money'} = { 'file' => 'Aviva_cimp_ +money_positive.txt', col_names => [qw(rcrd_typ +e seq_no emp_no forename surname initial ni_no ttl gender dob emp_cnt +rbtn emplyr_ctr tax_peri +od tax_yr exch_amt)] $dbh->do('UPDATE cimp_money SET forename=?,surname=? WHERE emp_no=?',u +ndef,$wrk_forename,$wrk_surname,$wrk_emp_no) or die $DBI::errstr;
Basically updates are happening correctly but the issue Im facing is since the header records i.e. first 2 lines are just 3 columns and details records has 4 columns its assuming that even in first 2 rows also it has a header and its updating ~ to row 1 and 2 which is what I want to remove now
Output Data X~Y~Z~~ 1~2~3~~ col1~col2~col3~col4~col5 A~B~C~D~E
In reply to DBD::CSV Update by PERL_fresher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |