You may also like...

3 Responses

  1. Noel says:

    I am always wary of distinct clauses for this reason. Hadn’t considered it for fetch first.

  2. Klaas Brant says:

    And a big warning for 9.7 FP 9!! If you have a FIRST n ROWS clause and the table was runstats while it was empty (but now has rows) then the resultset is EMPTY! Described in APAR IC98604: INCORRECT RESULTSET MIGHT BE RETURNED WHEN STATISTICS WERE PREVIOUSLY GATHERED ON AN EMPTY TABLE. A good friend found out just in time before it hit production! IBM seems pretty calm about it… I think the Fix pack should be pulled for such a major INCORROUT. Only applies to FP9. Greetz, Klaas Brant

  1. January 28, 2014

    […] The Danger of FETCH FIRST ROW ONLY […]

Leave a Reply

Your email address will not be published. Required fields are marked *