Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for looking!#!/usr/bin/perl -w use strict; use CGI qw/:standard/; my @acc_list = (00001 .. 1000); # this will have at lest 20000 accout +numbers in if (!@acc_list) { die " Nothing at this time";exit; } # From 1 table my $c_1=0; my $tb1; while ( @acc_list ) { $c_1++; my @files1 = splice( @acc_list, 0, 100 ); print "\n23 - @files1\n"; #my $holders_one = join ',', ('?') x @files1; #$tb1 = $dbh->exec_select( qq|select * from table1 where acc in ($ho +lders_one)|,@files1 ); } foreach (@$tb1) { print "\n1- Found 1\n"; } print "\n\n 33 - @acc_list \n\n"; # From 2 table my $c_2=0; my $tb2; while ( @acc_list ) { $c_2++; my @files2 = splice( @acc_list, 0, 100 ); #my $holders_two = join ',', ('?') x @files2; #$tb2 = $dbh->exec_select( qq|select * from table2 where acc in ($ho +lders_two)|,@files2 ); } foreach (@$tb2) { print "\n 2- Found 2\n"; } print "\n\n 52 - @acc_list \n\n"; # From 3 table my $c_3=0; my $tb3; while ( @acc_list ) { $c_3++; my @files3 = splice( @acc_list, 0, 100 ); #my $holders_three = join ',', ('?') x @files3; #$tb3 = $dbh->exec_select( qq|select * from table3 where acc in ($ho +lders_three)|,@files3 ); } foreach (@$tb3) { print "\n 3- Found 3\n"; } print "\n\n68 - **@acc_list** \n\n"; print "\n\n Done \n\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Loosing value and my mind on this one, help!!!
by BrowserUk (Patriarch) on Dec 01, 2011 at 20:16 UTC | |
by Anonymous Monk on Dec 01, 2011 at 20:31 UTC | |
|
Re: Loosing value and my mind on this one, help!!!
by TJPride (Pilgrim) on Dec 02, 2011 at 09:32 UTC | |
by Anonymous Monk on Dec 02, 2011 at 14:28 UTC | |
by TJPride (Pilgrim) on Dec 02, 2011 at 16:16 UTC | |
by graff (Chancellor) on Dec 02, 2011 at 22:15 UTC |