in reply to Pre-process csv files before using
That will make a new CSV file that is an exact duplicate of the original except leaving out the columns you don't want. The "CREATE TABLE AS SELECT ..." syntax is only available in the newest version of SQL::Statement (the SQL engine for DBD::CSV).# my $dbh = DBI->connect( ... ); my $wanted_cols = join ',',qw( colname1 colname2 ...); $dbh->do(" CREATE TABLE new_table AS SELECT ($wanted_cols) FROM old_table ");
|
|---|