Help for this page

Select Code to Download


  1. or download this
    use strict;
    use DBI;
    ...
    for my $index (0..$#left_column) {
        $sth->execute($right_column, $left_column);
    };
    
  2. or download this
    my $statement = 'UPDATE wordtable SET right_column = CASE ';
    $statement .= join "\n", map { "WHEN left_column = '$left_column[_]' T
    +HEN '$right_column[$_]'" } 0..$#left_column;
    $statement .= "END;";
    print $statement;