Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    3

    Unanswered: selecting records in a given range.

    Hi All,

    I am Vinod and joined this group today. I need some help on Db2 queires to be executed in the stored procedures.

    When i run this query [I got this format of query from this site itself] in the command center [7.x ver], I get the following error message.

    --------------------------- Command entered ----------------------------
    WITH RANGETEST AS
    (SELECT GGX_GROUP, ROW_NUMBER OVER (ORDER BY GGX_GROUP_ID) AS RN
    FROM tggx_generic_group)
    SELECT GGX_GROUP, RN
    FROM RANGETEST
    WHERE RN BETWEEN 2 AND 7
    ------------------------------------------------------------------------
    SQL0104N An unexpected token "(" was found following "". Expected tokens may
    include: ", FROM INTO". SQLSTATE=42601

    Thanks in advance, Vinod

  2. #2
    Join Date
    Jun 2006
    Posts
    3
    Hi All,

    I forgot to mention one more thing.

    Even if i give " ROW_NUMBER() ", i get the same message.

    Regards, Vinod

  3. #3
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Try executing this query with DB2 version 8.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

Posting Permissions

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