Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    1

    Unanswered: set cursor and fetch 10 rows after cursurposition

    Hi there!

    i'm new to DB2-Sql and i have a small problem.

    i want to set the cursor on a specific position in my table and read 10 records.

    Can anybody help me to find a solution.


    regards Smudo

  2. #2
    Join Date
    Oct 2003
    Posts
    87
    DECLARE CURSOR eee AS
    SELECT * FROM aaa.bbb WHERE ccc => :ddd
    set :ddd = :fff
    OPEN CURSOR eee
    FETCH CURSOR eee INTO ggg <ten times>

    Not keeping up real well on DB2 SQL, anyway, there may be a new construct for cursors in DB2 that would allow first going to ddd and then filling a matrix/table with the next 9 rows as well.
    Something like this
    FETCH CURSOR eee INTO ggg FOR 10 ROWS
    Oracle - DB2 - MS Access -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •