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); }
In reply to Add Text record to access table? by manoorani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |