manoorani has asked for the wisdom of the Perl Monks concerning the following question:
my $line; while ($line = <lbc*.txt>){ open (LOGFILE, "$line") || die "Can't open LOGFILE \n"; while(<LOGFILE>) { my($tdater, $filen, $ttot, $ttot2, $logfilen, $tots, $diff) = split(/\|/); chomp ($tdater); chomp ($filen); chomp ($ttot); chomp ($ttot2); chomp ($logfilen); chomp ($tots); chomp ($diff); print ("$tdater", "$filen", "\n"); my $theyear = 2000 + substr $tdater,6,2; my $themo = substr $tdater, 0, 2; my $thedt = substr $tdater, 3, 2; my $thedate = $theyear . "/" . $themo . "/" . $thedt; my $quer1="INSERT into logfile ('Date Send', 'Certificate file', 'No of Certificate', PDFNO, 'log + file', 'Notice sent', Difference) VALUES ({d '$thedate'}, '$filen', '$ttot', '$ttot2', '$logfile +n', '$tots', '$diff')"; my $query = q! INSERT INTO logfile ("Date Send", "Certificate file") VALUES ({d '$thedate'}, $filen) !; if ( $db->Sql($query)) { print "error executing query [ \"$query\" ]\n"; print "Error: " . Win32::ODBC::Error() . "\n"; } } close(LOGFILE); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Add Text record to access table?
by dreadpiratepeter (Priest) on Feb 15, 2002 at 17:04 UTC | |
|
Re: Add Text record to access table?
by Rich36 (Chaplain) on Feb 15, 2002 at 17:35 UTC | |
|
Re: Add Text record to access table?
by manoorani (Novice) on Feb 15, 2002 at 17:06 UTC | |
by dreadpiratepeter (Priest) on Feb 16, 2002 at 04:40 UTC | |
by Anonymous Monk on Feb 20, 2002 at 13:56 UTC | |
by dreadpiratepeter (Priest) on Feb 20, 2002 at 14:26 UTC | |
by manoorani (Novice) on Feb 26, 2002 at 18:42 UTC |