First, a slightly off-topic suggestion: put the "prepare()" statement outside (above) the while loop -- one of the advantages of using placeholders is "prepare once, execute often", because this saves a lot of overhead on the DB server side. (This would also involve putting the "finish()" call after the loop.)
Getting back on topic, is it possible that the table definition on the remote server is different from the one on your local machine? E.g. maybe your local version has a uniqueness constraint that isn't being applied on the remote server's version?
Another issue, since the stored procedure controls insertion by querying for values of "col1 FROM tableX WHERE col3 = @field1", is whether this other table on the remote server contains the same data as your local version.
A third thing to check is whether the input data files being used locally vs. remotely really are the same. Could the remote server be getting a "longer" version of the CSV file? (Who knows how it might have gotten "longer"... still it's worth checking to be sure.)
I don't see anything in the perl code that would lead to different behaviors depending on local vs. remote (CGI?) runtime environments. The differences are most likely a matter of table definitions or data.
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.