in reply to DBI place holder for sub query problem
Note that the order of the values in the execute is the order of the placeholders in the SQL, not the order the tables are opened.$sth=$dbh->prepare(" UPDATE tableA SET colA =( SELECT colB FROM tableB WHERE colC=? ) WHERE tableA.rec_no=? "); foreach my $row ( @rows ) { $sth->execute( $row->{'tableB.value'}, $row->{'tableA.value'} ) or die $dbh->errstr; }
|
---|