rownum error

Posted on 2005-05-03
Last Modified: 2006-11-18
i was trying to see first 10 rows

select  *  from vw_employee fetch first 10 rows

plz advice

DBA2191E SQL execution error. A
database manager error occurred. : [IBM][CLI Driver][DB2/NT]
SQL0104N  An unexpected token "END-OF-STATEMENT" was found
following "e fetch first 0 rows".  Expected tokens may include:
 "ONLY".  SQLSTATE=42601

Question by:bobby2929
    1 Comment
    LVL 7

    Accepted Solution


    You just missed "only"

    select * from tabname fetch first 10 rows only


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now