(Please take this with a grain of salt — I have virtually no experience with MS SQL ... I'm just replying in the hope that any suggestion might be better than none :)

...my stored procedure decides if a record gets inserted or not.

How is tableX related to priceHistory, i.e. how does the result of the SELECT change, once a record has been inserted into priceHistory? In other words, how does tableX help to distinguish if inserting a certain record would produce a duplicate?

Anyhow, sometimes, mysterious DB behaviour is the result of commits not happening when you think they should... I have no clear idea, though, how that would account for the difference between your local and the server machine, but maybe some different AutoCommit default setting of the ODBC driver, or some such. In the absence of any better ideas, I'd try to commit myself, or explicitly enable AutoCommit.  Just a thought.


In reply to Re: DBI Inserting Duplicate Records by almut
in thread DBI Inserting Duplicate Records by PerlAcolyte

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.