Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    15

    Unanswered: SQL request that retreive a limited number of row

    Hi,

    I would like to retrive with an SQL select statement a limited number of row.

    On ADABAS:the request would be:

    db2 "select * from tablename where rowno<=5"

    This retreive 5 first row.

    SQL0206N "ROWNO" is not valid in the context where it is used.
    SQLSTATE=42703

    Thanks

  2. #2
    Join Date
    Mar 2004
    Posts
    448
    use "fetch first <no_of_rows> rows only". after from clause.

    regards,

    mujeeb

  3. #3
    Join Date
    Jun 2004
    Posts
    15
    thanks a lot this is working

  4. #4
    Join Date
    Jun 2004
    Posts
    15
    thanks a lot this is working

Posting Permissions

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