<?xml version="1.0" encoding="windows-1252"?>
<node id="995758" title="fetchrow_array() issue" created="2012-09-26 08:23:53" updated="2012-09-26 08:23:53">
<type id="115">
perlquestion</type>
<author id="984831">
Freezer</author>
<data>
<field name="doctext">
Hi Monks&lt;br&gt;&lt;br&gt;

I have a problem with the following:

&lt;code&gt;


   my $sql_A = "SELECT DISTINCT parameter_id FROM e.measurement WHERE ((parameter_id LIKE 'M%') OR (parameter_id LIKE 'G%') OR (parameter_id LIKE 'E%')) AND parameter_id NOT LIKE '%_________8__' ORDER BY parameter_id;";
    
    my $Output_A = "List_parameters_common_to_centers.txt";   
    
    open (OUTFILE_A, "&gt;&gt;$Output_A") || die "Error opening outfile.$!,stopped";
    
    
    my $sth_A = $dbh-&gt;prepare($sql_A) or die "Cannot prepare: " . $dbh-&gt;errstr();
    $sth_A-&gt;execute() or die "$sth_A-&gt;errstr\n";
    
    my @row_A; 
    my @parameters_A; 
    my @record_A; 
    
    while(@row_A = $sth_A-&gt;fetchrow_array()) {
	@record_A = @row_A;
	push(@parameters_A, @record_A);
	print OUTFILE_A "@record_A\n";
    }
    
    
    $sth_A-&gt;finish();
    


&lt;/code&gt;

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.

&lt;br&gt;&lt;br&gt;
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.

</field>
</data>
</node>
