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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.