http://qs321.pair.com?node_id=995758

Freezer has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks

I have a problem with the following:
my $sql_A = "SELECT DISTINCT parameter_id FROM e.measurement WHERE +((parameter_id LIKE 'M%') OR (parameter_id LIKE 'G%') OR (parameter_i +d LIKE 'E%')) AND parameter_id NOT LIKE '%_________8__' ORDER BY para +meter_id;"; my $Output_A = "List_parameters_common_to_centers.txt"; open (OUTFILE_A, ">>$Output_A") || die "Error opening outfile.$!,s +topped"; my $sth_A = $dbh->prepare($sql_A) or die "Cannot prepare: " . $dbh +->errstr(); $sth_A->execute() or die "$sth_A->errstr\n"; my @row_A; my @parameters_A; my @record_A; while(@row_A = $sth_A->fetchrow_array()) { @record_A = @row_A; push(@parameters_A, @record_A); print OUTFILE_A "@record_A\n"; } $sth_A->finish();
The Perl code seems to drop a whole lot of what the select statement takes. UPDATE: This is comparing what i get from the SELECT statement directly, to what I get with it is buried in perl code.

UPDATE: I think that there is a memory problem because there should be 911 rows and instead I am getting 459, with the last row only being a partial string.