as supplement:
this is definitely the problem, use always placeholders! some values have to be quoted so the db knows where the value ends.
also you you can speed up the inserts by reuseing your statements and performing them all in one transaction.
$dbh->do('BEGIN TRANSACTION');
my $sta=$dbh->prepare("INSERT INTO ISP(Store,Date) VALUES(?, ?)");
my $stb=$dbh->prepare("INSERT INTO UnityPrimary(Store,Date) VALUES(?,
+?)");
my $stc=$dbh->prepare("INSERT INTO UnitySecondary(Store,Date) VALUES(?
+ , ?)");
while (<CSV>){
chomp;
my($store,$isp,$pri,$sec)=split /,/;
$sta->execute($store,$isp);
$stb->execute($store,$pri);
$stc->execute($store,$sec);
}
$dbh->('END TRANSACTION');
oh yes, and definements like
INTEGER or
CHAR[9] mean nothing to SQLite2. the only column define which is usefull is
PRIMARY KEY INTEGER for self generating unique keys.
update: just for your information, DBD::SQLite $VERSION >= 1 is actualy SQLite 3, DBD::SQLite2 was made to update the SQLite 2 path. just in case you want to benefit from the new features in v3 but didn't know how weird the modules are named.
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.