There are two (related) things that I see that could be happening, not knowing your table description :

How do you know how many rows are there in your database? Did you run SELECT COUNT(*) FROM Transaction ? This would be the only sure way to know how many rows there are in your table.

How do you know that there are no duplicate IDs? Your script finishes the loop after it has retrieved the first row for a given ID without throwing an error if there are more rows to be retrieved. You should check your column restrictions, add the check to your program, and run some SQL to check that each ID is unique (which is too early in the morning for me to come up with, but someone will surely correct me):

SELECT DISTINCT a.ID,b.ID FROM Transactions as a,Transactions as b whe +re a.ID = b.ID

Caveat: Please do not try this command in the production directly, because we at Cartesian Products take our business seriously (or so I fear). I think this command will chew up some serious memory.

Also, did you check what your maximum ID is?

SELECT max(ID) FROM Transactions

Nothing of this should apply if your column definition for ID defines PRIMARY KEY, unless you used some bulk loader command or other external means to initialize your database.

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web

In reply to Re: DBD::ODBC won't read past a certain record by Corion
in thread DBD::ODBC won't read past a certain record by Groll

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.