From: "Southworth, Harry" <harry.southwo...@astrazeneca.com>
> I think that if I append (rather than overwrite) each report with each
> table, I could restructure the code like you suggest. Thanks for
> pointing that out - it hadn't occurred to me. 
> 
> > my %sth;
> > for (0..$#tables){
> >   $sth{$tables[$_]} = $dbh->prepare(
> >    "SELECT * FROM $theTable WHERE usubjid = ?"
> >   );
> > }
> 
> I already tried something like that, but using an array rather than a
> hash. Is there a reason why an array wouldn't work? 

Nope. Not sure why I used a hash. an array and $sth[$_] would work 
just as well.

If this did not help then most likely the problem is elsewhere.

Jenda
===== je...@krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to