Sorry I made mistake in previous post
my $sth1 = $dbh->prepare("Select k1 From t1") or die "preparing: $DBI::errstr"; "preparing: $DBI::errstr"; $sth1->execute or die "executing: $DBI::errstr"; my @fields1; while (@fields1 = $sth1->fetchrow_array) { my $sth2 = $dbh->prepare("Select k2 From t2 Where k1 = ?") or die $sth2->bind_param(1, $fields1[0]); $sth2->execute or die "executing: $DBI::errstr"; my @fields2; while (@fields2 = $sth2->fetchrow_array ) { print ">>>T2 - $fields1[0] $fields2[0]\n"; } $sth2->finish; } $sth1->finish; $dbh->disconnect; In my environment it works well. In your case I get "Segmentation fault" -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]