How do you do LIMIT in DB2 for iSeries?

344655 pts.
Tags:
DB2
iSeries
SQL
We currently have a table of more than 50,000 records and we're trying to return records of 0 to 10,000 / records of 10,000 to 20,000. We already know that in SQL, if you write "LIMIT 0,10000" at the end of the query, it will bring you that record. How can you do it in DB2 for iSeries? Thanks!

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta

    ...we're trying to return records of 0 to 10,000 / records of 10,000 to 20,000

    What does that mean? Are you trying to say you want to return record sets in blocks of 10,000 rows? How are you trying to access the table? Is it remote access? Are you running on the server?

    Do you know the version of DB2? In recent releases, the ROW_NUMBER() function would be used 

    We already know that in SQL, if you write "LIMIT 0,10000"...

    Technically, "SQL" has no "LIMIT" clause. Standard SQL uses a ROW_NUMBER() function to implement a windowing feature. The LIMIT clause is an extension in some non-standard SQL statements from some vendors. (DB2 also has various non-standard extensions.)

    Tom

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following